mirror of
https://github.com/google/adb-sync.git
synced 2026-01-03 01:48:02 +00:00
If there is no path component at all, do append it to the destination.
This commit is contained in:
4
adb-sync
4
adb-sync
@@ -589,12 +589,14 @@ def FixPath(src, dst):
|
||||
# rsync-like path munging to make remote specifications shorter.
|
||||
pos = src.rfind(b'/')
|
||||
if pos >= 0:
|
||||
if pos == len(src)-1:
|
||||
if src.endswith(b'/'):
|
||||
# Final slash: copy to the destination "as is".
|
||||
src = src[:-1]
|
||||
else:
|
||||
# No final slash: destination name == source name.
|
||||
dst += src[pos:]
|
||||
else:
|
||||
dst += b'/' + src
|
||||
return (src, dst)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user