Skip to content

Commit 569167d

Browse files
committed
[IGNORE] backport script fix to GDT
1 parent adbf387 commit 569167d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/python/restore_backup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ def recoverFile():
6767
return False
6868

6969
prefix, ext = os.path.splitext(destPath)
70-
os.rename(destPath, prefix + '_copy' + ext)
71-
os.rename(bakPath, destPath)
70+
newDest = prefix + '_recovered' + ext
71+
os.rename(bakPath, newDest)
7272

73-
if hou.ui.displayMessage('Do you want to open the file?', ('Yes', 'Cancel'), close_choice=1):
74-
hou.hipFile.load(destPath)
73+
if hou.ui.displayMessage('Do you want to open the file?', ('Yes', 'Cancel'), close_choice=1) == 0:
74+
hou.hipFile.load(newDest)
7575

0 commit comments

Comments
 (0)