фикс восстановления из бэкапа

This commit is contained in:
rzaitov 2013-11-12 15:54:46 +04:00
parent 5270c5b8d0
commit b736419957
1 changed files with 1 additions and 2 deletions

View File

@ -35,8 +35,7 @@ class RestoreBackupCommand(BaseBackupCommand):
srcAbsPath = os.path.join(self.srcAbsDirPath, fileOrDirName)
fileInBackupFolderAbsPath = os.path.join(self.backupDirAbsPath, fileOrDirName)
print fileInBackupFolderAbsPath, srcAbsPath
if os.path.isdir(srcAbsPath):
if os.path.isdir(fileInBackupFolderAbsPath):
shutil.copytree(fileInBackupFolderAbsPath, srcAbsPath)
else:
shutil.copy(fileInBackupFolderAbsPath, srcAbsPath)