@@ -760,13 +760,13 @@ impl LaunchProfiles {
760760 if cfg ! ( target_os = "linux" ) {
761761 // Strip `STEAM_COMPAT_CLIENT_INSTALL_PATH` env var from all presets;
762762 // it's set at runtime now as part of compat setup.
763- static STEAM_COMPAT_REMOVAL_REGEX : LazyLock < Regex > = LazyLock :: new ( || {
763+ static STEAM_COMPAT_CLIENT_REMOVAL_REGEX : LazyLock < Regex > = LazyLock :: new ( || {
764764 Regex :: new ( r#"\s*STEAM_COMPAT_CLIENT_INSTALL_PATH="[^"]*"\s*"# ) . unwrap ( )
765765 } ) ;
766766
767767 for profile in & mut loaded. profiles {
768768 if profile. is_preset ( ) {
769- let new_command = STEAM_COMPAT_REMOVAL_REGEX
769+ let new_command = STEAM_COMPAT_CLIENT_REMOVAL_REGEX
770770 . replace_all ( & profile. command , " " )
771771 . trim ( )
772772 . to_string ( ) ;
@@ -780,6 +780,27 @@ impl LaunchProfiles {
780780 }
781781 }
782782
783+ // Strip `STEAM_COMPAT_DATA_PATH` env var from all presets;
784+ // it's set at runtime now as part of compat setup.
785+ static STEAM_COMPAT_DATA_REMOVAL_REGEX : LazyLock < Regex > =
786+ LazyLock :: new ( || Regex :: new ( r#"\s*STEAM_COMPAT_DATA_PATH="[^"]*"\s*"# ) . unwrap ( ) ) ;
787+
788+ for profile in & mut loaded. profiles {
789+ if profile. is_preset ( ) {
790+ let new_command = STEAM_COMPAT_DATA_REMOVAL_REGEX
791+ . replace_all ( & profile. command , " " )
792+ . trim ( )
793+ . to_string ( ) ;
794+ if new_command != profile. command {
795+ debug ! (
796+ "Migrating launch profile {}: stripping STEAM_COMPAT_DATA_PATH" ,
797+ profile. get_id( )
798+ ) ;
799+ profile. command = new_command;
800+ }
801+ }
802+ }
803+
783804 // If there's no launch profile for the embedded GE Proton, add one.
784805 let ge_proton_embedded = get_app_statics ( ) . resource_dir . join ( "ge-proton" ) . exists ( ) ;
785806 if ge_proton_embedded
0 commit comments