##// END OF EJS Templates
addbackup: handle file in subdirectory...
Pierre-Yves David -
r23315:66275ecc default
parent child Browse files
Show More
@@ -12,6 +12,7 b''
12 # GNU General Public License version 2 or any later version.
12 # GNU General Public License version 2 or any later version.
13
13
14 from i18n import _
14 from i18n import _
15 import os
15 import errno
16 import errno
16 import error, util
17 import error, util
17
18
@@ -203,7 +204,10 b' class transaction(object):'
203
204
204 if file in self.map or file in self._backupmap:
205 if file in self.map or file in self._backupmap:
205 return
206 return
206 backupfile = "%s.backup.%s" % (self.journal, file)
207 dirname, filename = os.path.split(file)
208
209 backupfilename = "%s.backup.%s" % (self.journal, filename)
210 backupfile = os.path.join(dirname, backupfilename)
207 if vfs is None:
211 if vfs is None:
208 vfs = self.opener
212 vfs = self.opener
209 if vfs.exists(file):
213 if vfs.exists(file):
General Comments 0
You need to be logged in to leave comments. Login now