[totem-pl-parser] disc: Get the original filename for ISO images



commit 962a8a8b7ca4a8643507d92c2424e526c1df9890
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Apr 5 16:46:40 2012 +0100

    disc: Get the original filename for ISO images

 plparse/totem-disc.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/plparse/totem-disc.c b/plparse/totem-disc.c
index a7eee31..4d1d5c3 100644
--- a/plparse/totem-disc.c
+++ b/plparse/totem-disc.c
@@ -352,8 +352,16 @@ cd_cache_new (const char *dev,
     local = g_strdup (dev);
     file = g_file_new_for_path (dev);
   } else {
-    file = g_file_new_for_commandline_arg (dev);
-    local = g_file_get_path (file);
+    if (g_str_has_prefix (dev, "archive://")) {
+      char *orig_uri;
+      orig_uri = unescape_archive_name (dev);
+      file = g_file_new_for_uri (orig_uri);
+      g_free (orig_uri);
+      local = g_file_get_path (file);
+    } else {
+      file = g_file_new_for_commandline_arg (dev);
+      local = g_file_get_path (file);
+    }
   }
 
   if (local == NULL) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]