@@ -16,6 +16,7 @@ class MainClass
1616 private static string serverIndex ;
1717 private static string cachePath ;
1818 private static string gamedataPath ;
19+ private static int checkedFiles ;
1920 private static bool enableDelete = false ;
2021 private static bool enableRun = true ;
2122 private static bool enableStock = false ;
@@ -72,6 +73,7 @@ public static void Main(string[] args)
7273 excludeList . Add ( "darkmultiplayer/" ) ;
7374 excludeList . Add ( "squad/" ) ;
7475 excludeList . Add ( "squadexpansion/" ) ;
76+ containsExcludeList . Add ( ".log" ) ;
7577 containsExcludeList . Add ( "modulemanager.configcache" ) ;
7678 containsExcludeList . Add ( "modulemanager.configsha" ) ;
7779 containsExcludeList . Add ( "modulemanager.physics" ) ;
@@ -84,6 +86,7 @@ public static void Main(string[] args)
8486 int syncError = LoadServerCache ( ) ;
8587 if ( syncError == 0 )
8688 {
89+ Console . WriteLine ( "Checking files..." ) ;
8790 if ( enableDelete )
8891 {
8992 DeleteFromGameData ( ) ;
@@ -157,15 +160,15 @@ private static int LoadServerCache()
157160 {
158161 if ( filePath . ToLower ( ) . StartsWith ( ignoreString , StringComparison . Ordinal ) )
159162 {
160- Console . WriteLine ( "Skipping ignored file: " + filePath ) ;
163+ // Console.WriteLine("Skipping ignored file: " + filePath);
161164 skipFile = true ;
162165 }
163166 }
164167 foreach ( string ignoreString in containsExcludeList )
165168 {
166169 if ( filePath . ToLower ( ) . Contains ( ignoreString ) )
167170 {
168- Console . WriteLine ( "Skipping ignored file: " + filePath ) ;
171+ // Console.WriteLine("Skipping ignored file: " + filePath);
169172 skipFile = true ;
170173 }
171174 }
@@ -201,15 +204,15 @@ private static void DeleteFromGameData()
201204 {
202205 if ( trimmedPath . ToLower ( ) . StartsWith ( ignoreString , StringComparison . Ordinal ) )
203206 {
204- Console . WriteLine ( "Skipping ignored file: " + filePath ) ;
207+ // Console.WriteLine("Skipping ignored file: " + filePath);
205208 skipFile = true ;
206209 }
207210 }
208211 foreach ( string ignoreString in containsExcludeList )
209212 {
210213 if ( trimmedPath . ToLower ( ) . Contains ( ignoreString ) )
211214 {
212- Console . WriteLine ( "Skipping ignored file: " + filePath ) ;
215+ // Console.WriteLine("Skipping ignored file: " + filePath);
213216 skipFile = true ;
214217 }
215218 }
@@ -219,7 +222,7 @@ private static void DeleteFromGameData()
219222 }
220223 if ( ! filePath . ToLower ( ) . StartsWith ( gamedataPath . ToLower ( ) , StringComparison . Ordinal ) )
221224 {
222- Console . WriteLine ( "Not touching " + filePath + " as it is outside of GameData (symlink?)" ) ;
225+ // Console.WriteLine("Not touching " + filePath + " as it is outside of GameData (symlink?)");
223226 continue ;
224227 }
225228 if ( ! serverFiles . ContainsKey ( trimmedPath ) )
@@ -237,15 +240,15 @@ private static void DeleteFromGameData()
237240 {
238241 if ( trimmedPath . ToLower ( ) . StartsWith ( ignoreString , StringComparison . Ordinal ) )
239242 {
240- Console . WriteLine ( "Skipping ignored file: " + trimmedPath ) ;
243+ // Console.WriteLine("Skipping ignored file: " + trimmedPath);
241244 skipDir = true ;
242245 }
243246 }
244247 foreach ( string ignoreString in containsExcludeList )
245248 {
246249 if ( trimmedPath . ToLower ( ) . Contains ( ignoreString ) )
247250 {
248- Console . WriteLine ( "Skipping ignored file: " + trimmedPath ) ;
251+ // Console.WriteLine("Skipping ignored file: " + trimmedPath);
249252 skipDir = true ;
250253 }
251254 }
@@ -279,13 +282,15 @@ private static void AddMissingToGameData()
279282 File . Copy ( fileCachePath , filePath ) ;
280283 if ( isUpdate )
281284 {
282- Console . WriteLine ( "Updated/Checked " + kvp . Key ) ;
285+ //Console.WriteLine("Updated/Checked " + kvp.Key);
286+ checkedFiles ++ ;
283287 }
284288 else
285289 {
286290 Console . WriteLine ( "Added " + kvp . Key ) ;
287291 }
288292 }
293+ Console . WriteLine ( "Updated/Checked " + checkedFiles + " existing files." ) ;
289294 }
290295
291296 private static void RunKSP ( )
0 commit comments