-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Fix utf-8 char path in windows #1002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes, well spotted!
Thank you for the fix! 👍
app/src/command.c
Outdated
@@ -208,8 +208,23 @@ process_check_success(process_t proc, const char *name) { | |||
|
|||
bool | |||
is_regular_file(const char *path) { | |||
#ifdef __WINDOWS__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For command.c
, there are platform-specific implementations in sys/win/
and sys/unix/
.
Since the implementation is now (almost) totally different, I think the function can be moved there (without additional ifdef).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see new version.
The file 'E:\安安\scrcpy-win64-v1.12.1-1-g31bd950\scrcpy-server' exists, however, it will show msg as follow: INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy> stat: No such file or directory ERROR: 'E:\安安\scrcpy-win64-v1.12.1-1-g31bd950\scrcpy-server' does not exist or is not a regular file Press any key to continue... This patch fixes it. Signed-off-by: Yu-Chen Lin <[email protected]>
Thank you. However, I fail to make it work on Windows. I declared the environment variable When I execute
(If I rename |
Signed-off-by: Yu-Chen Lin <[email protected]>
Thank you for your testing. There are two problems here.
I have a computer which will get absolute path from However, if I set env variable as your testing method, it does not work again. After digging on it, I found the problem is due to the getenv. This problem fixed by 2639c6a. Thanks. |
Oh thank you 👍 There was a problem with Then I rebased your commit and edited the last one. Please review |
I have tested on my computer, everything works! Thank you. |
Fix utf-8 char path in windows <#1002>
👍 Thank you very much. Merged into |
Released in v1.13. |
The file 'E:\安安\scrcpy-win64-v1.12.1-1-g31bd950\scrcpy-server'
exists, however, it will show msg as follow:
INFO: scrcpy 1.12.1 https://github.com/Genymobile/scrcpy
stat: No such file or directory
ERROR: 'E:\安安\scrcpy-win64-v1.12.1-1-g31bd950\scrcpy-server' does not
exist or is not a regular file
Press any key to continue...
This patch fixes it.
Signed-off-by: Yu-Chen Lin [email protected]