mirror of
https://github.com/google/adb-sync.git
synced 2026-01-06 19:38:01 +00:00
Do not cut off final slash from source path.
Other than somewhat annoying // in path names printed or passed to adb push/pull, this breaks nothing. Fixes #9.
This commit is contained in:
2
adb-sync
2
adb-sync
@@ -640,7 +640,7 @@ def FixPath(src: bytes, dst: bytes) -> Tuple[bytes, bytes]:
|
|||||||
if pos >= 0:
|
if pos >= 0:
|
||||||
if src.endswith(b'/'):
|
if src.endswith(b'/'):
|
||||||
# Final slash: copy to the destination "as is".
|
# Final slash: copy to the destination "as is".
|
||||||
src = src[:-1]
|
pass
|
||||||
else:
|
else:
|
||||||
# No final slash: destination name == source name.
|
# No final slash: destination name == source name.
|
||||||
append = src[pos:]
|
append = src[pos:]
|
||||||
|
|||||||
Reference in New Issue
Block a user