mercurial/transaction.py
changeset 23315 66275ecc73c1
parent 23314 43f66ae57a66
child 23316 fc3670f41d3e
--- a/mercurial/transaction.py	Fri Nov 14 14:54:55 2014 +0000
+++ b/mercurial/transaction.py	Fri Nov 14 00:14:23 2014 +0000
@@ -12,6 +12,7 @@
 # GNU General Public License version 2 or any later version.
 
 from i18n import _
+import os
 import errno
 import error, util
 
@@ -203,7 +204,10 @@
 
         if file in self.map or file in self._backupmap:
             return
-        backupfile = "%s.backup.%s" % (self.journal, file)
+        dirname, filename = os.path.split(file)
+
+        backupfilename = "%s.backup.%s" % (self.journal, filename)
+        backupfile = os.path.join(dirname, backupfilename)
         if vfs is None:
             vfs = self.opener
         if vfs.exists(file):