Nautilus-scripts don't handle blanks in filenames properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Nautilus |
New
|
Low
|
|||
nautilus (Ubuntu) |
Triaged
|
Low
|
Ubuntu Desktop Bugs |
Bug Description
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=$
for file in $files
do
zenity --info --text "$(md5sum $file)"
done
# ---- end of script
Create that script in ~/.gnome2/
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_
echo "-----------"
You'll get something like:
---files---
/home/
-----------
instead of:
---files---
/home/
/home/
-----------
Suggestion: Use a different delimiter to split multiple marked files.
Use '\n' instead of ' '.
Changed in nautilus: | |
status: | Unknown → Unconfirmed |
Changed in nautilus: | |
importance: | Unknown → Low |
Thanks for your bug report. This bug has been reported to the developers of the software. You can track it and make comments here: http:// bugzilla. gnome.org/ show_bug. cgi?id= 424606