nautilus passes invalid URIs to bulk-rename-tool

Bug #1183665 reported by Timo Palomaa on 2013-05-24
This bug affects 9 people
Affects Status Importance Assigned to Milestone
nautilus (Ubuntu)

Bug Description

Spaces or cyrillic symbols in folder names are not passed correctly. For example, for the selected files "/home/user/untitled/untitled folder/testfile*"", nautilus passes the following URIs as arguments:


And for "/home/user/untitled/папка/testfile*", the following URIs:


Reprod on: 3.4.2 (me), 3.6.3 (me), 3.8.1

Originally reported in nautilus-renamer:

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: nautilus 1:3.6.3-0ubuntu16
ProcVersionSignature: Ubuntu 3.8.0-21.32-generic 3.8.8
Uname: Linux 3.8.0-21-generic x86_64
ApportVersion: 2.9.2-0ubuntu8
Architecture: amd64
Date: Fri May 24 08:02:22 2013
 b'org.gnome.nautilus.window-state' b'geometry' b"'1025x628+195+61'"
 b'org.gnome.nautilus.window-state' b'sidebar-width' b'183'
InstallationDate: Installed on 2012-12-24 (150 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
SourcePackage: nautilus
UpgradeStatus: Upgraded to raring on 2013-04-25 (28 days ago)

Timo Palomaa (timppis) wrote :
description: updated
description: updated
Timo Palomaa (timppis) on 2013-05-24
description: updated
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nautilus (Ubuntu):
status: New → Confirmed
Thura (trh) on 2013-05-27
information type: Public → Public Security
information type: Public Security → Public
Stephen Barnes (abqsteve-u) wrote :

I noticed the bug appears if the original filename contains a space. Any spaces in the original filename are passed as "0".
For example: "test filename.jpg" becomes "test0filename.jpg"

melo (carmeloscollo) wrote :

Any updates about this? Sounds like a papercut bug to me.
Since I am using nautilus-renamer, which imo is the best GUI based batch renaming tool available for gnome, I would love to contribute a solution, because after 8 months this bug is still confirmed but unassigned. Any pointers on how to get started/where to look at?

Thanks in advance!

Luke (tiliqua-au) wrote :

As a workaround for nautilus-renamer - install the Nautilus-Actions Configuration Tool, create a new action and in the Command tab set the path to /usr/share/nautilus-renamer/ and the parameters to %U (a space separated list of the file/folder URIs which correctly encodes spaces as "%20" instead of "0")

LSK (nazarenkoal) wrote :

File names received from GList parameter in invoke_external_bulk_rename_utility are URL-encoded. Spaces in names replaced with '%20' literal.

Glib processes arguments and checks if for macro literals. It treats '%20' as macro '%2' and symbol '0'. So it filters out '%2' and leaves only zero.
E.g. 'file:///long%20directory/file%20name' will be translated to 'file:///long0directory/file0name'

One of the possible solutions is to URL-unescape file names.

The attachment "1183665.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers