GNOME Bugzilla – Bug 559093
f-spot can't import from directories with a : (colon) in the name
Last modified: 2010-06-21 18:25:45 UTC
this report has been filed here: https://bugs.edge.launchpad.net/ubuntu/+source/f-spot/+bug/289732 "f-spot 0.5.0.3 When trying to import photos from a directory with a colon in the name, the import wizard shows no photos. Removing the colon allows the import. It seems that the colon is not escaped in the URI as it should be. Running in a terminal gives the following error: System.UriFormatException: URI scheme must start with a letter and must consist of one of alphabet, digits, '+', '-' or '.' character. at System.Uri.Parse (UriKind kind, System.String uriString) [0x00000] at System.Uri.ParseUri (UriKind kind) [0x00000] at System.Uri..ctor (System.String uriString, Boolean dontEscape) [0x00000] at System.Uri..ctor (System.String uriString) [0x00000] at FileImportBackend.GetListing (System.IO.DirectoryInfo dirinfo, System.IO.FileInfo[] files, Boolean recurse) [0x00000] at FileImportBackend.GetListing (System.IO.DirectoryInfo info) [0x00000]"
+1.
See also https://bugs.launchpad.net/ubuntu/+source/f-spot/+bug/475811 ... ... AppendValues ( Gtk.TreeIter, 2003%20Kitchen%20Before) AppendValues ( Gtk.TreeIter, Michigan) AppendValues ( Gtk.TreeIter, Volume%202) AppendValues ( Gtk.TreeIter, Volume%203) AppendValues ( Gtk.TreeIter, 2005-02-12--14:13:46) [Warn 00:53:34.914] Caught an exception - URI scheme must start with a letter and must consist of one of alphabet, digits, '+', '-' or '.' character. (in `System') Notice that as soon as a name with a colon in it shows up f-spot børks. A look at mcs/class/System/System/Uri.cs (part of Mono) shows what happens: as soon as there is a colon in a string and that colon is not at position 0 (which is always an error) or position 1 (which is interpreted as following an MS-DOS/Windows drive letter) the part of the string before the colon is interpreted as an URI scheme (eg http, file, ftp, etc.). This will naturally lead to an error as (in the above example) ' 2005-02-12--14' is not a valid scheme. The solution is for f-spot to %-encode colons in the string before it gets handled by any of Mono's URI-handling functions. It does this for spaces (->%20) but not for colons (->%3A). This should be changed...
*** Bug 603028 has been marked as a duplicate of this bug. ***
I'll get the problem after an upgrade from whatver was in opensuse-11.1 when I upped to 11.2 which contains f-spot 0.6.1.3. [Debug 23:58:02.084] open uri = file:///home/family/images/DigiCam/2009/2009-01-01 Maikatze/2009-IV Quartal W2009-10-27 Stokke-Salami/img_2357.jpg GLib.GException: Error opening file: No such file or directory at GLib.FileAdapter.Read (GLib.Cancellable cancellable) [0x00000] at FSpot.ImageFile.Open () [0x0001e] in /usr/src/packages/BUILD/f-spot-0.6.1.3/src/Imaging/ImageFile.cs:34 at FSpot.JpegFile.PixbufStream () [0x00012] in /usr/src/packages/BUILD/f-spot-0.6.1.3/src/Imaging/JpegFile.cs:62 at FSpot.ImageFile.Load (Int32 max_width, Int32 max_height) [0x00000] in /usr/src/packages/BUILD/f-spot-0.6.1.3/src/Imaging/ImageFile.cs:121 at ImageLoaderThread.ProcessRequest (.RequestItem request) [0x00018] in /usr/src/packages/BUILD/f-spot-0.6.1.3/src/ImageLoaderThread.cs:154 The problem is in the pathname: This is what f-spot tries .../2009-01-01 Maikatze/2009-IV Quartal W2009-10-27 Stokke-Salami/img_2357.jpg but the real pathname (as seen in the db file too) is: .../2009-01-01 Maikatze/2009-IV Quartal W./2009-10-27 Stokke-Salami/img_2357.jpg
Okay, here is my work-around. 1.) quit f-stop 2.) rename all directories to rename the trailing dot "." 3.) cd ~/.config/f-spot 4.) sqlite3 photos.db update photos set base_uri = replace(base_uri, "W./", "W/") where base_uri like "%W./%"; update photo_versions set base_uri = replace(base_uri, "W./", "W/") where base_uri like "%W./%"; .quit everything should be fine now again
This should be fixed now, could you verify?
I still have F-Spot 0.6.1.5. I could recheck this when SuSe 11.3 is out and I have upgraded.
If you feel risky, you can try these: https://build.opensuse.org/project/show?project=GNOME%3AApps%3AF-Spot:Unstable
I am on Ubuntu 10.10 with f-spot 0.6.2 and when trying to import a folder with a ":" in the name, there is still the following message: System.UriFormatException: URI scheme must start with a letter and must consist of one of alphabet, digits, '+', '-' or '.' character. at System.Uri.Parse (UriKind kind, System.String uriString) [0x00000] at System.Uri.ParseUri (UriKind kind) [0x00000] at System.Uri..ctor (System.String uriString, Boolean dontEscape) [0x00000] at System.Uri..ctor (System.String uriString) [0x00000] at FileImportBackend.GetListing (System.IO.DirectoryInfo dirinfo, System.IO.FileInfo[] files, Boolean recurse) [0x00000] at FileImportBackend.GetListing (System.IO.DirectoryInfo info) [0x00000]
Ubuntu 10.10 should soon see the update to 0.7 so I will let you know.
The update to 0.7 came today and it's working fine now. Thus this bug can be closed. Thanks.
Marking it as Fixed.