[Bug 95519] Nautilus-scripts don't handle blanks in filenames properly
Stefan Wagner
wagner.stefan at berlin.de
Sat Mar 24 15:44:55 UTC 2007
Public bug reported:
Binary package hint: nautilus
Nautilus-scripts don't handle blanks in filenames properly.
Reproduce the bug:
a) Create some files with blanks:
echo aaa > ~/tmp/foo\ bar
echo aaa > ~/tmp/bar\ foo
b) Create a script to operate on files:
# ---- start of script
files=$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
for file in $files
do
zenity --info --text "$(md5sum $file)"
done
# ---- end of script
Create that script in ~/.gnome2/nautilus-scripts.
Make it executable.
It will shine up in the context-menu of nautilus to run scripts.
It will execute fine, if you mark a few files, which don't contain a blank.
If there is a blank, it doesn't work.
To see how this is happening, create another script:
echo "---files---"
echo $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
echo "-----------"
You'll get something like:
---files---
/home/stefan/tmp/foo bar /home/stefan/tmp/foo foo
-----------
instead of:
---files---
/home/stefan/tmp/foo bar
/home/stefan/tmp/foo foo
-----------
Suggestion: Use a different delimiter to split multiple marked files.
Use '\n' instead of ' '.
** Affects: nautilus (Ubuntu)
Importance: Undecided
Status: Unconfirmed
--
Nautilus-scripts don't handle blanks in filenames properly
https://launchpad.net/bugs/95519
More information about the desktop-bugs
mailing list