| 59 | const char *OS_Android::ANDROID_EXEC_PATH = "apk"; |
| 60 | |
| 61 | String _remove_symlink(const String &dir) { |
| 62 | // Workaround for Android 6.0+ using a symlink. |
| 63 | // Save the current directory. |
| 64 | char current_dir_name[2048]; |
| 65 | getcwd(current_dir_name, 2048); |
| 66 | // Change directory to the external data directory. |
| 67 | chdir(dir.utf8().get_data()); |
| 68 | // Get the actual directory without the potential symlink. |
| 69 | char dir_name_without_symlink[2048]; |
| 70 | getcwd(dir_name_without_symlink, 2048); |
| 71 | // Convert back to a String. |
| 72 | String dir_without_symlink(dir_name_without_symlink); |
| 73 | // Restore original current directory. |
| 74 | chdir(current_dir_name); |
| 75 | return dir_without_symlink; |
| 76 | } |
| 77 | |
| 78 | #ifdef TOOLS_ENABLED |
| 79 | _FORCE_INLINE_ static GameViewPlugin *_get_game_view_plugin() { |
no test coverage detected