GUI does not launch if a parent folder contains a space

Bug #1140872 reported by Timo Palomaa
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Status tracked in Trunk

Bug Description

For example, when I select above files in Nautilus:

~/untitled folder/1.jpg
~/untitled folder/2.jpg

Result: neither F2 or right-click menu ("Rename") opens the GUI: simply nothing happens.

When I select files below in Nautilus, the GUI opens and everything works correctly:


- It does not matter if the selected files or folders contain spaces or not, only if a parent folder (any of them) has a space in the name
- It's possible that other special characters also cause this, but I have not found any yet by random testing
- nautilus-renamer_4.0-quantal_all, reprod on a) Nautilus v3.4.2, Ubuntu 12.10 64bit b) Nautilus 3.6.3, Ubuntu 13.04 64bit

Timo Palomaa (timppis)
description: updated
description: updated
description: updated
description: updated
description: updated
Thura (trh)
Changed in nautilus-renamer:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Thura (trh)
Timo Palomaa (timppis)
description: updated
description: updated
Revision history for this message
Thura (trh) wrote :

I have tested this behavior under GNOME nautilus 3.8.1. This problems seems to be with the invalid URI's passed by nautilus to its bulk-rename-tool, registered in '/org/gnome/nautilus/preferences/bulk-rename-tool'.

For example, for the selected files "/home/thura/Development/nautilus-renamer/untitled/untitled 2/testfile*", nautilus passed the following uris as arguments.


So, this is a nautilus bug. Please, report in nautilus instead.

Revision history for this message
Timo Palomaa (timppis) wrote :
Revision history for this message
Luke (tiliqua-au) wrote :

As the nautilus bug is still open and has had no attention, here is a workaround:

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")

Revision history for this message
Luke (tiliqua-au) wrote :

Re. comment #3 I only tested on paths with spaces in filename. It fails on folders with spaces. To fix, I changed:

--- /usr/share/nautilus-renamer/ 2014-08-03 08:26:12.975538999 +1000
+++ bin/ 2014-08-29 05:53:28.177893435 +1000
@@ -1061,9 +1061,10 @@
 if __name__ == '__main__':
     files = []
     # get current directory
- common_prefix = os.path.commonprefix (sys.argv[1:])[len("file://"):]
+ common_prefix = os.path.commonprefix (sys.argv[1:])#[len("file://"):]
     cwd_pos = common_prefix.rfind ('/')
     cwd = common_prefix [:cwd_pos]
+ cwd = Gio.File.new_for_uri(cwd).get_path()

     if not cwd:
         raise RuntimeError ("Unable to determine current working directory.")

Revision history for this message
Thura (trh) wrote :

Hi Luke,

It is still not working on my box. What's your current nautilus version?

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.