-
- Downloads
adb: fix stat on Windows.
stat on Windows fails with ENOENT when passed a path with a trailing slash or backslash, regardless of whether the target is actually a directory. Emulate the correct POSIX behavior by stripping trailing path separators and then checking if the target is a directory if successful. Bug: http://b/30481559 Bug: https://code.google.com/p/android/issues/detail?id=214633 Change-Id: I1d398d19a9bce1ecb3fdc4aabc31aa98c82c3f93 Test: Relevant adb_tests pass on Linux and Windows 10. (cherry picked from commit f551ea0f)
Showing
- adb/Android.mk 2 additions, 0 deletionsadb/Android.mk
- adb/adb_utils_test.cpp 10 additions, 4 deletionsadb/adb_utils_test.cpp
- adb/sysdeps.h 2 additions, 23 deletionsadb/sysdeps.h
- adb/sysdeps/stat.h 46 additions, 0 deletionsadb/sysdeps/stat.h
- adb/sysdeps/stat_test.cpp 65 additions, 0 deletionsadb/sysdeps/stat_test.cpp
- adb/sysdeps/win32/stat.cpp 66 additions, 0 deletionsadb/sysdeps/win32/stat.cpp
- adb/sysdeps_win32.cpp 0 additions, 24 deletionsadb/sysdeps_win32.cpp
Loading
Please register or sign in to comment