Problem while sending a set of files with "%F" to an extended action

Bug #925938 reported by Mark Alan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Marlin
New
Undecided
Unassigned

Bug Description

Given 2 files named (with and without spaces in them):
"test ing long.txt"
"testinglong.txt"

And an extended action defined as:
[Extended Action Entry]
Name=Testing
Icon=
Description=ExtendedActionTesting
MimeType=all
Exec=$HOME/bin/actions/script "%F"

Receiving "%F" in an executable shell script "$HOME/bin/actions/script" defined as:
#!/bin/sh
for FILE in "$@" ; do
 path=${FILE%/*}
 new=$(echo ${FILE##*/} | sed 's, ,_,g')
 /usr/bin/notify-send -t 800000 "Test:" "file=$FILE\npath=$path\nnew=$new"
done

The bug is:
While running this extended action against each file on its own will produce the expected results,
running it against BOTH files at the same time will give wrong and unexpected results.
Various permutations of "$@" and $@, either in the extended action Exec or in the shell script, will each bring a different flavor of the anomaly.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.