From ad05a6980f241b5d0804e368901d56d30e0ba29e Mon Sep 17 00:00:00 2001 From: rzaitov Date: Wed, 13 Nov 2013 14:16:02 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=B4=20=D1=81=D0=BE?= =?UTF-8?q?=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8=D0=B5=D0=BC=20=D0=B1=D1=8D=D0=BA?= =?UTF-8?q?=D0=B0=D0=BF=D0=B0=20=D1=81=D1=82=D0=B0=D1=80=D1=83=D1=8E=20?= =?UTF-8?q?=D0=BF=D0=B0=D0=BF=D0=BA=D1=83=20=D1=83=D0=B4=D0=B0=D0=BB=D1=8F?= =?UTF-8?q?=D0=B5=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commands/BaseBackupCommand/CreateBackupCommand.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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: