From ab42433c32a025d57e69e74e6bd410d5840577f2 Mon Sep 17 00:00:00 2001 From: rzaitov Date: Tue, 12 Nov 2013 12:18:53 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=B1=D0=B0=D0=B3=20=D0=B2=20=D0=BA=D0=BE=D0=BC=D0=B0?= =?UTF-8?q?=D0=BD=D0=B4=D0=B5=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=B1=D1=8D=D0=BA=D0=B0=D0=BF=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/IosSetupSteps.txt | 2 +- .../commands/BaseBackupCommand/RestoreBackupCommand.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/IosSetupSteps.txt b/scripts/IosSetupSteps.txt index 307f904..441a651 100644 --- a/scripts/IosSetupSteps.txt +++ b/scripts/IosSetupSteps.txt @@ -1,4 +1,4 @@ -restore from backup # восстанавливаем из бэкапа (исходники от сборки предыдущей конфигурации могут быть модифицированными) +restore from backup 'BuildSample' # восстанавливаем из бэкапа (исходники от сборки предыдущей конфигурации могут быть модифицированными) create backup for 'BuildSample' inside 'BuildSample/BuildSample.sln' remove NotCompileApp project diff --git a/scripts/TouchinBuild/commands/BaseBackupCommand/RestoreBackupCommand.py b/scripts/TouchinBuild/commands/BaseBackupCommand/RestoreBackupCommand.py index c74085a..61b6747 100644 --- a/scripts/TouchinBuild/commands/BaseBackupCommand/RestoreBackupCommand.py +++ b/scripts/TouchinBuild/commands/BaseBackupCommand/RestoreBackupCommand.py @@ -1,3 +1,4 @@ +import os import shutil from commands.BaseBackupCommand.BaseBackupCommand import BaseBackupCommand @@ -10,5 +11,6 @@ class RestoreBackupCommand(BaseBackupCommand): src = self.getAbsSrc() backupDir = self.getAbsDst() - shutil.rmtree(src, ignore_errors=True) - shutil.copytree(backupDir, src, symlinks=False) + if os.path.exists(backupDir): + shutil.rmtree(src, ignore_errors=True) + shutil.copytree(backupDir, src, symlinks=False)