aafm icon indicating copy to clipboard operation
aafm copied to clipboard

Linux (possibly others) ampersand in filename

Open chriscamacho opened this issue 9 years ago • 5 comments

NB gui just shows none moving progress bar (but still responsive to closing window) no error message on gui

console output as follows:

EXECUTE ('adb', '-s', '0929e3ef', 'shell', 'mkdir', '/mnt/sdcard/Music/Bob Marley & The Wailers')
EXECUTE ('adb', '-s', '0929e3ef', 'shell', 'ls', '-l', '-a', '/mnt/sdcard/Music/Bob Marley & The Wailers/')
/system/bin/sh:  The Wailers/: not found wasn't matched, please report to the developer!
/mnt/sdcard/Music/Bob Marley : No such file or directory wasn't matched, please report to the developer!
EXECUTE ('adb', '-s', '0929e3ef', 'shell', 'mkdir', "/mnt/sdcard/Music/Bob Marley & The Wailers/Talkin' Blues")
EXECUTE ('adb', '-s', '0929e3ef', 'shell', 'ls', '-l', '-a', '/mnt/sdcard/Music/Bob Marley & The Wailers/')
/system/bin/sh:  The Wailers/: not found wasn't matched, please report to the developer!
/mnt/sdcard/Music/Bob Marley : No such file or directory wasn't matched, please report to the developer!
EXECUTE ('adb', '-s', '0929e3ef', 'shell', 'mkdir', '/mnt/sdcard/Music/Bob Marley & The Wailers/Legend')
EXECUTE ('adb', '-s', '0929e3ef', 'shell', 'ls', '-l', '-a', '/mnt/sdcard/Music/Bob Marley & The Wailers/')
/system/bin/sh:  The Wailers/: not found wasn't matched, please report to the developer!
Traceback (most recent call last):
  File "./aafm-gui.py", line 850, in process_queue_task
    src(*dst)
  File "/home/chris/development/aafm/src/Aafm.py", line 265, in copy_file_to_device
    assert self.is_device_file_a_directory(os.path.dirname(device_file))
AssertionError

chriscamacho avatar Dec 30 '15 09:12 chriscamacho

find . -depth -name '&' -execdir bash -c 'mv "$1" "${1//&/and}"' _ {} ;

rename recusivly all files in current working path, replacing & with and

(work-a-round)

chriscamacho avatar Dec 30 '15 09:12 chriscamacho

Thanks for filing the issue! It does look like we should escape things better, not force people to rename their files! :-)

sole avatar Jan 05 '16 09:01 sole

lol - for sure (was just temp thing in case ppl needed something to work NOW!) ;) btw don't feel too bad it transferred around 4GB with this being the only issue, and it compiles nice and easy too...

chriscamacho avatar Jan 05 '16 13:01 chriscamacho

Ive also found that a semicolon(;) also causes this problem

zymos avatar Feb 16 '16 01:02 zymos

I have added escaping in my fork

xeruf avatar Jun 19 '18 17:06 xeruf