-
Bug
-
Resolution: Unresolved
-
P4
-
25
-
iOS
The auto-merge of https://bugs.openjdk.org/browse/JDK-8358799 into the openjdk/mobile repository had a conflict, because the os_bsd.cpp code contained ios-specific code that was removed in the fix for JDK-8358799.
The os-specific code for detecting the path to the current module was moved into os_posix.cpp.
For iOS, we used to do this:
```
#ifdef _IOS_
const char *homeDir = getenv("HOME");
snprintf(buf, buflen, "%s/Documents/", homeDir);
return;
#endif
```
I wasn't happy with that approach, as it depends on an environment variable and it makes assumptions on where the VM is located relative to the app install dir, hence I'm not worried that this code has been removed.
In this issue, we should discuss and implement a better approach for this method on iOS.
The os-specific code for detecting the path to the current module was moved into os_posix.cpp.
For iOS, we used to do this:
```
#ifdef _IOS_
const char *homeDir = getenv("HOME");
snprintf(buf, buflen, "%s/Documents/", homeDir);
return;
#endif
```
I wasn't happy with that approach, as it depends on an environment variable and it makes assumptions on where the VM is located relative to the app install dir, hence I'm not worried that this code has been removed.
In this issue, we should discuss and implement a better approach for this method on iOS.