sole / aafm

Android ADB file manager
GNU General Public License v3.0
222 stars 50 forks source link

Copying a directory foo requires copying to foo/foo on computer. #37

Closed marcmerlin closed 11 years ago

marcmerlin commented 12 years ago

I can't copy /sdcard/anything to /path/on/laptop/backup I need to create /path/on/laptop/backup/anything and then aafm will copy to /path/on/laptop/backup/anything/anything.

If I don't do this, I get this error: COPY FROM DEVICE: /mnt/sdcard/.astro => /usr/local/lib/aafm/Android/GN_GSM_20120512/.astro EXECUTE= adb shell ls -l -a "/mnt/sdcard" /mnt/sdcard/.astro is a dir Traceback (most recent call last): File "./aafm-gui.py", line 581, in copy_from_device_task self.aafm.copy_to_host(full_device_path, full_host_path) File "/usr/local/lib/aafm/src/Aafm.py", line 198, in copy_to_host os.mkdir(host_directory) OSError: [Errno 2] No such file or directory: '/usr/local/lib/aafm/Android/GN_GSM_20120512/.astro/.astro'

Note that in the copy above, I was in /usr/local/lib/aafm/Android/GN_GSM_20120512/ It is aafm that mistakenly added '.astro' to the destination dir.

marcmerlin commented 12 years ago

Forgot to add that this happened before and still happens after I did a fresh aafm github checkout.

marcmerlin commented 12 years ago

Another related error I got later while trying my own trick:

EXECUTE= adb shell ls -l -a "/mnt/sdcard/" EXECUTE= adb shell ls -l -a "/mnt/" EXECUTE= adb shell ls -l -a "/storage" EXECUTE= adb shell ls -l -a "/mnt/sdcard/" ./aafm-gui.py:354: GtkWarning: Unknown property: GtkMenu.ubuntu-local builder.add_from_file(os.path.join(self.basedir, 'data/glade/menu_contextual_host.xml')) EXECUTE= adb shell ls -l -a "/mnt/" EXECUTE= adb shell ls -l -a "/storage" COPY FROM DEVICE: /mnt/sdcard => /usr/local/lib/aafm/Android/GN_CMDA_20120512/sdcard EXECUTE= adb shell ls -l -a "/mnt" EXECUTE= adb shell ls -l -a "/storage" /mnt/sdcard is a dir EXECUTE= adb shell ls -l -a "/mnt/sdcard" EXECUTE= adb shell ls -l -a "/storage" COPY FROM DEVICE: /mnt/sdcard/sdcard => /usr/local/lib/aafm/Android/GN_CMDA_20120512/sdcard/sdcard EXECUTE= adb shell ls -l -a "/mnt/sdcard" EXECUTE= adb shell ls -l -a "/storage" /mnt/sdcard/sdcard is a dir EXECUTE= adb shell ls -l -a "/mnt/sdcard/sdcard" /mnt/sdcard/sdcard: No such file or directory wasn't matched, please report to the developer!

xisberto commented 11 years ago

I got the same error, and found a solution.

On file aafm/src/Aafm.py, I commented line 196. This line makes /path/to/laptop/backup/anything becomes /path/to/laptop/backup/anything/anything before the creation of the destination directory.

sole commented 11 years ago

Hi there, I merged your change in. Well spotted! :-)

Thanks!