1
0
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:
Rudolf Polzer
2014-09-09 07:05:10 +02:00
parent 33f3c1502f
commit fe9d9f1584

View File

@@ -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)