diff --git a/scripts/TouchinBuild/commands/BaseBackupCommand/CreateBackupCommand.py b/scripts/TouchinBuild/commands/BaseBackupCommand/CreateBackupCommand.py index 32b76a9..cb559dd 100644 --- a/scripts/TouchinBuild/commands/BaseBackupCommand/CreateBackupCommand.py +++ b/scripts/TouchinBuild/commands/BaseBackupCommand/CreateBackupCommand.py @@ -8,11 +8,14 @@ class CreateBackupCommand(BaseBackupCommand): BaseBackupCommand.__init__(self) def execute(self): - if os.path.exists(self.backupDirAbsPath): - raise Exception('folder: {0} already exists'.format(self.backupDirAbsPath)) + #if os.path.exists(self.backupDirAbsPath): + # raise Exception('folder: {0} already exists'.format(self.backupDirAbsPath)) dirContent = os.listdir(self.srcAbsDirPath) + if os.path.exists(self.backupDirAbsPath): + shutil.rmtree(self.backupDirAbsPath) + os.mkdir(self.backupDirAbsPath) for fileOrDir in dirContent: