[f-spot] Work around the case of broken gphoto2 URIs.
- From: Ruben Vermeersch <rubenv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot] Work around the case of broken gphoto2 URIs.
- Date: Wed, 15 Sep 2010 11:59:41 +0000 (UTC)
commit 510215c6da09a2e2a8ccb5eac53e58aa08c0c3ed
Author: Ruben Vermeersch <ruben savanne be>
Date: Wed Sep 15 13:59:12 2010 +0200
Work around the case of broken gphoto2 URIs.
https://bugzilla.gnome.org/show_bug.cgi?id=629248
src/Clients/MainApp/FSpot/App.cs | 6 ++++++
tools/f-spot-import | 2 +-
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/Clients/MainApp/FSpot/App.cs b/src/Clients/MainApp/FSpot/App.cs
index 0a8fee6..cdcfeea 100644
--- a/src/Clients/MainApp/FSpot/App.cs
+++ b/src/Clients/MainApp/FSpot/App.cs
@@ -221,6 +221,12 @@ namespace FSpot
void HandleImport (string path)
{
+ // Some users get wonky URIs here, trying to work around below.
+ // https://bugzilla.gnome.org/show_bug.cgi?id=629248
+ if (path.StartsWith ("gphoto2:usb:")) {
+ path = String.Format ("gphoto2://[{0}]", path.Substring (8));
+ }
+
Hyena.Log.DebugFormat ("Importing from {0}", path);
Organizer.Window.Present ();
Organizer.ImportFile (path == null ? null : new SafeUri(path));
diff --git a/tools/f-spot-import b/tools/f-spot-import
index 98385b1..e27917e 100755
--- a/tools/f-spot-import
+++ b/tools/f-spot-import
@@ -24,7 +24,7 @@ else
bus=`hal-get-property --udi="$udi" --key=usb.bus_number`
dev=`hal-get-property --udi="$udi" --key=usb.linux.device_number`
- uri=`printf gphoto2:[usb:%.3d,%.3d] $bus $dev`
+ uri=`printf gphoto2://[usb:%.3d,%.3d] $bus $dev`
f-spot --import "$uri"
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]