[pitivi] project: Do not return None in _makeBackupURI



commit d4b77fb906f57814091ef75bf9c33322f9c764b4
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date:   Sat Oct 13 23:23:55 2012 -0400

    project: Do not return None in _makeBackupURI
    
    It does not make sense to do the project mimetype check here (GES does it
    in the file chooser), especially with a naÃve file extension check.
    
    Removing this prevents errors downstream when comparing modification times.

 pitivi/project.py |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/project.py b/pitivi/project.py
index fe4fd0e..a7cf8ad 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -443,14 +443,13 @@ class ProjectManager(Signallable, Loggable):
     def _makeBackupURI(self, uri):
         """
         Returns a backup file URI (or path if the given arg is not a URI).
-        This does not guarantee that the backup file actually exists.
+        This does not guarantee that the backup file actually exists or that
+        the file extension is actually a project file.
 
         @Param the project file path or URI
         """
         name, ext = os.path.splitext(uri)
-        if ext == '.xptv':
-            return name + ext + "~"
-        return None
+        return name + ext + "~"
 
     def _formatterMissingURICb(self, formatter, tfs):
         return self.emit("missing-uri", formatter, tfs)



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