Пофиксил востановление из бэкапа, не резолвились пути
This commit is contained in:
parent
10a41bf1db
commit
5a717d273e
|
|
@ -14,8 +14,9 @@ class RestoreBackupCommand:
|
|||
dirPairs = [(name, "backup.{0}".format(name)) for name in os.listdir(baseDir) if os.path.isdir(self.__pathProvider.resolveAbsPath(name)) and not name.startswith('backup.')]
|
||||
|
||||
for pair in dirPairs:
|
||||
if not os.path.exists(pair[1]):
|
||||
absPair = (self.__pathProvider.resolveAbsPath(pair[0]), self.__pathProvider.resolveAbsPath(pair[1]))
|
||||
if not os.path.exists(absPair[1]):
|
||||
continue
|
||||
|
||||
shutil.rmtree(pair[0]) # delete src
|
||||
shutil.copytree(pair[1], pair[0]) # restore from backup
|
||||
shutil.rmtree(absPair[0]) # delete src
|
||||
shutil.copytree(absPair[1], absPair[0]) # restore from backup
|
||||
|
|
|
|||
|
|
@ -2,5 +2,6 @@
|
|||
#import ManualTests.info_plist_test
|
||||
#import ManualTests.copy_test
|
||||
#import ManualTests.create_backup_test
|
||||
#import ManualTests.delete_backup_test
|
||||
|
||||
import ManualTests.delete_backup_test
|
||||
import ManualTests.restore_backup_test
|
||||
Loading…
Reference in New Issue