Fix make.py temp files cleanup (#8189)

This commit is contained in:
Dystopian 2021-04-17 21:08:18 +04:00 committed by GitHub
parent eeba8a8dbf
commit 88e08dc130
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -592,7 +592,9 @@ def get_project_version(version_increments=[]):
def replace_file(filePath, oldSubstring, newSubstring):
fh, absPath = mkstemp()
global work_drive
fh, absPath = mkstemp(None, None, work_drive + "temp")
os.close(fh)
with open(absPath, "w", encoding="utf-8") as newFile:
with open(filePath, encoding="utf-8") as oldFile:
for line in oldFile: