@@ -34,13 +34,13 @@ public static async Task<int> Main(string[] args)
3434 Console . WriteLine ( "AppId is not specified." ) ;
3535 return 1 ;
3636 }
37- if ( Path . Exists ( unturnedPath ) == false )
37+ if ( Directory . Exists ( unturnedPath ) == false )
3838 {
3939 Console . WriteLine ( $ "Path doesn't exists: \" { unturnedPath } \" .") ;
4040 return 1 ;
4141 }
4242 var redistPath = Path . Combine ( unturnedPath , "redist" ) ;
43- if ( Path . Exists ( redistPath ) == false )
43+ if ( Directory . Exists ( redistPath ) == false )
4444 {
4545 Console . WriteLine ( $ "Redist path doesn't exists: \" { redistPath } \" .") ;
4646 return 1 ;
@@ -65,7 +65,6 @@ public static async Task<int> Main(string[] args)
6565 Console . WriteLine ( $ "steamapps Directory not found: \" { steamappsDirectory } \" ") ;
6666 return 1 ;
6767 }
68- Console . WriteLine ( "steamappsDirectory: " + string . Join ( ", " , Directory . GetDirectories ( steamappsDirectory ) ) ) ;
6968
7069 var unturnedDataPath = GetUnturnedDataDirectoryName ( unturnedPath ) ;
7170 var managedDirectory = Path . Combine ( unturnedDataPath , "Managed" ) ;
@@ -159,13 +158,13 @@ private static string GetUnturnedDataDirectoryName(string unturnedPath)
159158 var version = $ "3.{ node [ "Major_Version" ] } .{ node [ "Minor_Version" ] } .{ node [ "Patch_Version" ] } ";
160159
161160 var appmanifestFileName = $ "appmanifest_{ appId } .acf";
162- var appdataPath = Path . Combine ( steamappsPath , "steamapps" , appmanifestFileName ) ;
163- if ( ! File . Exists ( appdataPath ) )
161+ var appmanifestFilePath = Path . Combine ( steamappsPath , appmanifestFileName ) ;
162+ if ( File . Exists ( appmanifestFilePath ) == false )
164163 {
165- throw new FileNotFoundException ( "Required file is not found" , appmanifestFileName ) ;
164+ throw new FileNotFoundException ( "Required file is not found" , appmanifestFilePath ) ;
166165 }
167166
168- await using var file = File . OpenRead ( appdataPath ) ;
167+ await using var file = File . OpenRead ( appmanifestFilePath ) ;
169168 var kv = KVSerializer . Create ( KVSerializationFormat . KeyValues1Text ) ;
170169 var obj = kv . Deserialize ( file ) ;
171170
0 commit comments