spion / adbfs-rootless

Mount Android phones on Linux with adb. No root required.
Other
890 stars 73 forks source link

Error for files with backticks in name: unexpected EOF while looking for matching `` #41

Open dima74 opened 5 years ago

dima74 commented 5 years ago

If I have a file which name contains backtick (`), then I can't open this file. For example I have file /storage/0403-0201/E`kzamen, then adbfs will print the following error:

--*-- exec_command: adb shell "ls -l -a -d '/storage/0403-0201/E`kzamen'" 2>&1
sh: -c: line 0: unexpected EOF while looking for matching ``'
sh: -c: line 1: syntax error: unexpected end of file

The solution would be to escape backtick, so the command becomes adb shell "ls -l -a -d '/storage/0403-0201/E\`kzamen'"