[pitivi/ges: 256/287] Properly clear backup files
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges: 256/287] Properly clear backup files
- Date: Thu, 15 Mar 2012 16:47:22 +0000 (UTC)
commit 8f05cac704acb05f0b39337288758400c7a4fc56
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Thu Feb 9 18:48:05 2012 -0500
Properly clear backup files
pitivi/project.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/project.py b/pitivi/project.py
index 64c5600..f600e0e 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -33,6 +33,7 @@ import gobject
from time import time
from datetime import datetime
from gettext import gettext as _
+from urllib import unquote
from urlparse import urlparse
from pwd import getpwuid
@@ -367,9 +368,8 @@ class ProjectManager(Signallable, Loggable):
def _cleanBackup(self, uri):
if uri is None:
return
-
location = self._makeBackupURI(uri)
- path = urlparse(location).path
+ path = unquote(urlparse(location).netloc)
if os.path.exists(path):
os.remove(path)
@@ -458,6 +458,7 @@ class Project(Signallable, Loggable):
def setUri(self, uri):
# FIXME support not local project
if uri and not gst.uri_has_protocol(uri, "file"):
+ # Note that this does *not* give the same result as quote_uri()
self._uri = gst.uri_construct("file", uri)
else:
self._uri = uri
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]