From 576a839c18e636f017ef301224c536a9e689bad8 Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Thu, 25 Mar 2021 13:14:33 -0500 Subject: [PATCH] Don't ship filenames with colons in them CW-Bug-Id: #22054 --- default_pfx.py | 9 +++++++++ proton | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/default_pfx.py b/default_pfx.py index 3a926227..414df8a1 100755 --- a/default_pfx.py +++ b/default_pfx.py @@ -109,6 +109,14 @@ def filter_registry(filename): os.rename(filename + '.tmp', filename) +#steampipe can't handle filenames with colons, so we remove them here +#and restore them in the proton script +def fixup_drive_links(default_pfx_dir): + for walk_dir, dirs, files in os.walk(os.path.join(default_pfx_dir, "dosdevices")): + for dir_ in dirs: + if ":" in dir_: + os.remove(os.path.join(walk_dir, dir_)) + def make_default_pfx(default_pfx_dir, dist_dir): local_env = dict(os.environ) @@ -125,6 +133,7 @@ def make_default_pfx(default_pfx_dir, dist_dir): env=local_env, check=True) setup_dll_symlinks(default_pfx_dir, dist_dir) + fixup_drive_links(default_pfx_dir) filter_registry(os.path.join(default_pfx_dir, 'user.reg')) filter_registry(os.path.join(default_pfx_dir, 'system.reg')) diff --git a/proton b/proton index 3a7c9073..4189dc77 100755 --- a/proton +++ b/proton @@ -783,6 +783,12 @@ class CompatData: self.migrate_user_paths() + if not os.path.lexists(self.prefix_dir + "/dosdevices/c:"): + os.symlink("../drive_c", self.prefix_dir + "/dosdevices/c:") + + if not os.path.lexists(self.prefix_dir + "/dosdevices/z:"): + os.symlink("/", self.prefix_dir + "/dosdevices/z:") + # collect configuration info steamdir = os.environ["STEAM_COMPAT_CLIENT_INSTALL_PATH"]