Revert "proton: Sync pfx creation and create a guard file."

This reverts commit 73fbc6890c.

It keeps the prefix version bump so we don't forcefully downgrade people
for no reason.
This commit is contained in:
Arkadiusz Hiler 2023-01-04 20:24:48 +02:00
parent 47e39203c7
commit 2bf76f6e50

19
proton
View file

@ -16,7 +16,6 @@ import subprocess
import sys
import tarfile
import shlex
import time
from ctypes import CDLL
from ctypes import CFUNCTYPE
@ -476,7 +475,6 @@ class CompatData:
def __init__(self, compatdata):
self.base_dir = compatdata + "/"
self.prefix_dir = self.path("pfx/")
self.creation_sync_guard = self.path("pfx/creation_sync_guard")
self.version_file = self.path("version")
self.config_info_file = self.path("config_info")
self.tracked_files_file = self.path("tracked_files")
@ -626,13 +624,6 @@ class CompatData:
log("Unable to write new registry file to " + sysreg_fp)
pass
if int(old_proton_maj) < 7 or (int(old_proton_maj) == 7 and
int(old_proton_min) == 0 and
int(old_prefix_ver) < 101):
with open(self.creation_sync_guard, "w"):
pass
os.sync()
stale_builtins = [self.prefix_dir + "/drive_c/windows/system32/amd_ags_x64.dll",
self.prefix_dir + "/drive_c/windows/syswow64/amd_ags_x64.dll" ]
for builtin in stale_builtins:
@ -792,20 +783,12 @@ class CompatData:
self.upgrade_pfx(old_ver)
# not fully-created prefix, copy it for future investigation
if file_exists(self.prefix_dir, follow_symlinks=True) and not file_exists(self.creation_sync_guard, follow_symlinks=True):
shutil.move(self.prefix_dir, self.path(f"corrupted_pfx-{time.time()}.bak"))
if not file_exists(self.prefix_dir, follow_symlinks=True):
makedirs(self.prefix_dir + "/drive_c")
set_dir_casefold_bit(self.prefix_dir + "/drive_c")
if not file_exists(self.prefix_dir + "/user.reg", follow_symlinks=True):
self.copy_pfx()
os.sync()
with open(self.creation_sync_guard, "x"):
pass
os.sync()
self.migrate_user_paths()