google / adb-sync

Apache License 2.0
1.08k stars 169 forks source link

Can't resume syncing folder in reverse mode after faliure #19

Closed ruippeixotog closed 6 years ago

ruippeixotog commented 6 years ago

I tried to use adb-sync to sync the contents of /sdcard to a local directory. However, I had to terminate the command before it finished.

I expected to resume the operation later, just like rsync and other file syncing tools, but when I tried the following message appeared:

❯ adb-sync -R /sdcard .
Sync: local ./sdcard, remote /sdcard
Scanning and diffing...
Pull-Delete-Conflicting: ./sdcard
Would have to replace to do this. Use --force to allow this.
Total: 0 KB/s (0 bytes in 0.432s)

The error is too vague to understand what's going on. Is something like this not allowed?

divVerent commented 6 years ago

Try /sdcard/. as source. /sdcard is a symlink after all.

On Mon, Oct 16, 2017 at 8:30 PM, Rui Gonçalves notifications@github.com wrote:

I tried to use adb-sync to sync the contents of /sdcard to a local directory. However, I had to terminate the command before it finished.

I expected to resume the operation later, just like rsync and other file syncing tools, but when I tried the following message appeared:

❯ adb-sync -R /sdcard . Sync: local ./sdcard, remote /sdcard Scanning and diffing... Pull-Delete-Conflicting: ./sdcard Would have to replace to do this. Use --force to allow this. Total: 0 KB/s (0 bytes in 0.432s)

The error is too vague to understand what's going on. Is something like this not allowed?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/google/adb-sync/issues/19, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPWsPeYXzT9LFQjjvW2fotyzV5R8GOOks5ss_U7gaJpZM4P7a01 .

ruippeixotog commented 6 years ago

Yeah, I remembered that later and ended up syncing with /storage/emulated/0 instead. I forgot to update this issue, sorry. Thanks anyway for the help :)

Anyway, adb-sync -R /sdcard <local_path> worked the first time (when I didn't have a local copy at all) and was syncing the folder as I expected initially. While I understand why it failed when I tried the second time, shouldn't the behavior be the same in the two cases, for consistency? Maybe adb-sync should always refuse to sync a symlink?

dannysood commented 6 years ago

@ruippeixotog @divVerent This can be closed. From my experience symlink always is refused.

ruippeixotog commented 6 years ago

It seems that I can't reproduce the problem with any of my current devices. Closing this issue.