jb2170 / better-adb-sync

Completely rewritten adbsync with --exclude
Apache License 2.0
344 stars 22 forks source link

when pull, files is sync to different dir for first time and second time #28

Closed tennkou closed 1 year ago

tennkou commented 1 year ago

when use pull, eg: pull /sdcard/b /a/b when execute for the first time, the files in /sdcard/b is sync to /a/b; then execute again, the files in /sdcard/b is sync to /a/b/b; I dont known whether this is because the first time /a/b is not exists, and the second time /a/b has bean created.

is this an issue, or I run this script on a wrong way?

tennkou commented 1 year ago

when use pull, eg: pull /sdcard/b /a/b when execute for the first time, the files in /sdcard/b is sync to /a/b; then execute again, the files in /sdcard/b is sync to /a/b/b; I dont known whether this is because the first time /a/b is not exists, and the second time /a/b has bean created.

is this an issue, or I run this script on a wrong way?

the command i used is: python3 adbsync.py pull /sdcard/Pictures/Screenshots /Users/****/android/local/sdcard/Pictures/Screenshots

And the second time i execute, the files is sync to dir: /Users/****/android/local/sdcard/Pictures/Screenshots/Screenshots

jb2170 commented 1 year ago

This is something to do with following rsync's convention of whether the source folder has a trailing slash or not

tennkou commented 1 year ago

This is something to do with following rsync's convention of whether the source folder has a trailing slash or not

I change command from 'pull /sdcard/b /a/b' to 'pull /sdcard/b/ /a/b', and it works as I expected