[pitivi: 9/12] Pass valid uris for filenames to discoverer. Fixes #611996.



commit 8ef1474e3c045b813963abf4128ba61f49e710fa
Author: Alessandro Decina <alessandro d gmail com>
Date:   Sun Mar 7 12:53:28 2010 +0100

    Pass valid uris for filenames to discoverer. Fixes #611996.

 pitivi/application.py |    3 ++-
 pitivi/sourcelist.py  |    1 -
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index 1ed81b5..e543b98 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -29,6 +29,7 @@ import gtk
 from optparse import OptionParser
 import os
 import sys
+import urllib
 
 from pitivi.pitivigstutils import patch_gst_python
 patch_gst_python()
@@ -272,7 +273,7 @@ class InteractivePitivi(Pitivi):
             # load the passed filenames, optionally adding them to the timeline
             # (useful during development)
             self.projectManager.newBlankProject()
-            uris = ["file://" + os.path.abspath(path) for path in args]
+            uris = ["file://" + urllib.quote(os.path.abspath(path)) for path in args]
             self.current.sources.connect("source-added",
                     self._sourceAddedCb, uris, options.add_to_timeline)
             self.current.sources.connect("discovery-error",
diff --git a/pitivi/sourcelist.py b/pitivi/sourcelist.py
index bc64d99..7424eb2 100644
--- a/pitivi/sourcelist.py
+++ b/pitivi/sourcelist.py
@@ -84,7 +84,6 @@ class SourceList(Signallable, Loggable):
         if uri in self._sources:
             raise SourceListError("URI already present in the source list", uri)
 
-        uri = urllib.unquote(uri)
         self._sources[uri] = None
 
         self.discoverer.addUri(uri)



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