@@ -14,7 +14,7 @@ public class DoomEternal
14
14
public const string GameName = "Doom Eternal" ;
15
15
16
16
public const int SteamGameID = 782330 ;
17
- public static string SteamSavePath = Path . Combine ( Utilities . GetSteamPath ( ) , "userdata" ) ;
17
+ public static string SteamSavePath = "" ;
18
18
public static string BnetSavePath = Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) , "Saved Games" , "id Software" , "DOOMEternal" , "base" , "savegame" ) ;
19
19
20
20
public static DoomEternalSavePathCollection Saves ;
@@ -30,11 +30,15 @@ public static void EnumerateSaves() {
30
30
}
31
31
}
32
32
33
- if ( Directory . Exists ( SteamSavePath ) ) {
34
- foreach ( var steamId3 in Directory . GetDirectories ( SteamSavePath , "*.*" , SearchOption . TopDirectoryOnly ) ) {
35
- foreach ( var single in Directory . GetDirectories ( steamId3 , "*.*" , SearchOption . TopDirectoryOnly ) ) {
36
- if ( Path . GetFileNameWithoutExtension ( single ) == SteamGameID . ToString ( ) )
37
- Saves . Add ( new DoomEternalSavePath ( Utilities . Id3ToId64 ( Path . GetFileNameWithoutExtension ( steamId3 ) ) , DoomEternalSavePlatform . Steam ) ) ;
33
+ string steamPath = Utilities . GetSteamPath ( ) ;
34
+ if ( ! string . IsNullOrEmpty ( steamPath ) ) {
35
+ SteamSavePath = Path . Combine ( steamPath , "userdata" ) ;
36
+ if ( Directory . Exists ( SteamSavePath ) ) {
37
+ foreach ( var steamId3 in Directory . GetDirectories ( SteamSavePath , "*.*" , SearchOption . TopDirectoryOnly ) ) {
38
+ foreach ( var single in Directory . GetDirectories ( steamId3 , "*.*" , SearchOption . TopDirectoryOnly ) ) {
39
+ if ( Path . GetFileNameWithoutExtension ( single ) == SteamGameID . ToString ( ) )
40
+ Saves . Add ( new DoomEternalSavePath ( Utilities . Id3ToId64 ( Path . GetFileNameWithoutExtension ( steamId3 ) ) , DoomEternalSavePlatform . Steam ) ) ;
41
+ }
38
42
}
39
43
}
40
44
}
0 commit comments