After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 301164 - Arguments are in reversed order
Arguments are in reversed order
Status: RESOLVED DUPLICATE of bug 308884
Product: nautilus
Classification: Core
Component: Scripts facilities
2.10.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-19 08:26 UTC by Daniel Eriksson
Modified: 2005-07-07 10:20 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10



Description Daniel Eriksson 2005-04-19 08:26:38 UTC
Please describe the problem:
I just noticed that the arguments sent to scripts invoked by Nautilus are in
reversed order.

Steps to reproduce:
1. Sort a directory for example by name
2. Select some files
3. Right click a file and start a script that prints out the arguments to a file


Actual results:
The file that is last in the sort order reaches the script as $1 and so on.

Expected results:
I expect the script to get the arguments in the same order as the sorting in
Nautilus uses

Does this happen every time?
Yep.

Other information:
Adding the following to the beginning of my scripts (and using $files instead of
$*) gets around this

files=
for i in $* ; do
        files="${i} ${files}"
done
Comment 1 Christian Neumair 2005-07-07 10:19:47 UTC

*** This bug has been marked as a duplicate of 308884 ***
Comment 2 Christian Neumair 2005-07-07 10:20:04 UTC
Thanks for the bug report. This particular bug has already been reported into
our bug tracking system, but please feel free to report any further bugs you find.