nautilus passes invalid URIs to bulk-rename-tool

Bug #1183665 reported by Timo Palomaa
50
This bug affects 9 people
Affects Status Importance Assigned to Milestone
nautilus (Ubuntu)
Confirmed
Undecided
Unassigned

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:

file:///home/user/untitled/untitled02/testfile1
file:///home/user/untitled/untitled02/testfile2

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

file:///home/user/untitled/0F000F0A00/testfile1
file:///home/user/untitled/0F000F0A00/testfile2

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

Originally reported in nautilus-renamer:

https://bugs.launchpad.net/nautilus-renamer/+bug/1140872
https://bugs.launchpad.net/nautilus-renamer/+bug/1166327

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
GsettingsChanges:
 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)

Revision history for this message
Timo Palomaa (timppis) wrote :
description: updated
description: updated
Timo Palomaa (timppis)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in nautilus (Ubuntu):
status: New → Confirmed
Thura (trh)
information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
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"

Revision history for this message
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!

Revision history for this message
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/nautilus-renamer.py and the parameters to %U (a space separated list of the file/folder URIs which correctly encodes spaces as "%20" instead of "0")

Revision history for this message
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.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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