Opened 9 years ago

Closed 8 years ago

#5320 closed Bug (fixed)

Can't open folder with a '#' in its name

Reported by: guihkx Owned by: jordan
Priority: Normal Milestone: 2.82
Component: GTK+ Client Version: 2.77
Severity: Normal Keywords: number sign, pound key, hash key, nautilus, gvfs-open, gtk+, folder
Cc: nikoli@…, fanatid@…

Description

Steps to reproduce the issue:

  1. Run transmission-gtk on terminal;
  2. Add a new torrent and save it in a folder named 'my # torrent';
  3. Right-click this torrent in transmission and go to 'Open Folder' option;
  4. Nautilus won't open. Go back to the terminal window:
gvfs-open: file:///home/user/Desktop/my # torrent/archlinux-2013.03.01-dual.iso: error opening location: Error when getting information for file '/home/user/Desktop/my ': No such file or directory

I'm sorry for my english.

Attachments (1)

transmissionbt.5320.diff (352 bytes) - added by fanatid 8 years ago.
5320,replace g_strdup_printf to g_filename_to_uri

Download all attachments as: .zip

Change History (10)

comment:1 Changed 9 years ago by jordan

  • Milestone changed from None Set to 2.80
  • Status changed from new to assigned

comment:2 Changed 9 years ago by Nikoli

  • Cc nikoli@… added

comment:3 Changed 9 years ago by jordan

  • Milestone changed from 2.80 to 2.90

comment:4 Changed 9 years ago by turbanoff

I think bug in gtr_open_file: ​https://trac.transmissionbt.com/browser/trunk/gtk/util.c#L362 It is better to use g_filename_to_uri to convert filename to uri, instead of manually with comvert with g_strdup_printf.

Changed 8 years ago by fanatid

5320,replace g_strdup_printf to g_filename_to_uri

comment:5 Changed 8 years ago by fanatid

  • Cc fanatid@… added

Hello, I replace g_strdup_printf to g_filename_to_uri in gtr_open_file function and tested in fedora 18, all ok. patch -- http://pastebin.com/VZ9BuhYn

comment:6 Changed 8 years ago by jordan

woo! thank you fanatid!

comment:7 Changed 8 years ago by jordan

  • Milestone changed from 2.90 to 2.82

comment:8 Changed 8 years ago by jordan

This revision still doesn't handle relative paths, but it got me thinking that we should use g_file_new_for_path() to do this work. This function briefly used GFile years ago, but it got removed because too many users didn't have GIO yet. That isn't an issue anymore.

comment:9 Changed 8 years ago by jordan

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in r14143.

Note: See TracTickets for help on using tickets.