Skip to content

Commit 2df38f7

Browse files
backups for replacements kinda
1 parent 3f33d04 commit 2df38f7

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

modimporter.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,10 +629,11 @@ def makeedit(base,mods,echo=True):
629629
if not os.path.exists(base):
630630
open(bakdir+"/"+base+baktype+".del","w").close()
631631
else:
632-
if isedited(base) and in_directory(bakdir+"/"+base+baktype,False):
633-
copyfile(bakdir+"/"+base+baktype,base)
632+
bakpath = bakdir+"/"+base+baktype
633+
if isedited(base) and in_directory(bakpath,False) and os.path.exists(bakpath):
634+
copyfile(bakpath,base)
634635
else:
635-
copyfile(base,bakdir+"/"+base+baktype)
636+
copyfile(base,bakpath)
636637
if echo:
637638
i=0
638639
LOGGER.info("\n"+base)

0 commit comments

Comments
 (0)