mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
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:
parent
3259c60b22
commit
64bcac9157
3 changed files with 24 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue