Refuse to push a non-regular file server
If SCRCPY_SERVER_PATH points to a directory, then a directory will be pushed to /data/local/tmp/scrcpy-server.jar. When executing it, app_process will just abort and leave the directory on the device, causing scrcpy to always fail. To avoid the problem, check that the server is a regular file before pushing it. Closes #956 <https://github.com/Genymobile/scrcpy/issues/956>
This commit is contained in:
@@ -85,4 +85,8 @@ process_check_success(process_t proc, const char *name);
|
||||
char *
|
||||
get_executable_path(void);
|
||||
|
||||
// returns true if the file exists and is not a directory
|
||||
bool
|
||||
is_regular_file(const char *path);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user