@@ -244,11 +244,11 @@ private static int RunSimpleAction(Options cmdline, CommonOptions options, strin
244244 return ( new Available ( repoData , user ) ) . RunCommand ( GetGameInstance ( manager ) , cmdline . options ) ;
245245
246246 case "install" :
247- Scan ( GetGameInstance ( manager ) , user , repoData , cmdline . action ) ;
247+ Scan ( GetGameInstance ( manager ) , repoData ) ;
248248 return ( new Install ( manager , repoData , user ) ) . RunCommand ( GetGameInstance ( manager ) , cmdline . options ) ;
249249
250250 case "scan" :
251- return Scan ( GetGameInstance ( manager ) , user , repoData ) ;
251+ return Scan ( GetGameInstance ( manager ) , repoData ) ;
252252
253253 case "list" :
254254 return ( new List ( repoData , user , Console . OpenStandardOutput ( ) ) ) . RunCommand ( GetGameInstance ( manager ) , cmdline . options ) ;
@@ -257,11 +257,11 @@ private static int RunSimpleAction(Options cmdline, CommonOptions options, strin
257257 return ( new Show ( repoData , user ) ) . RunCommand ( GetGameInstance ( manager ) , cmdline . options ) ;
258258
259259 case "replace" :
260- Scan ( GetGameInstance ( manager ) , user , repoData , cmdline . action ) ;
260+ Scan ( GetGameInstance ( manager ) , repoData ) ;
261261 return ( new Replace ( manager , repoData , user ) ) . RunCommand ( GetGameInstance ( manager ) , ( ReplaceOptions ) cmdline . options ) ;
262262
263263 case "upgrade" :
264- Scan ( GetGameInstance ( manager ) , user , repoData , cmdline . action ) ;
264+ Scan ( GetGameInstance ( manager ) , repoData ) ;
265265 return ( new Upgrade ( manager , repoData , user ) ) . RunCommand ( GetGameInstance ( manager ) , cmdline . options ) ;
266266
267267 case "search" :
@@ -348,30 +348,10 @@ private static int Version(IUser user)
348348 /// <param name="next_command">Changes the output message if set.</param>
349349 /// <returns>Exit.OK if instance is consistent, Exit.ERROR otherwise </returns>
350350 private static int Scan ( CKAN . GameInstance inst ,
351- IUser user ,
352- RepositoryDataManager repoData ,
353- string ? next_command = null )
351+ RepositoryDataManager repoData )
354352 {
355- try
356- {
357- RegistryManager . Instance ( inst , repoData ) . ScanUnmanagedFiles ( ) ;
358- return Exit . OK ;
359- }
360- catch ( InconsistentKraken kraken )
361- {
362-
363- if ( next_command == null )
364- {
365- user . RaiseError ( "{0}" , kraken . Message ) ;
366- user . RaiseError ( Properties . Resources . ScanNotSaved ) ;
367- }
368- else
369- {
370- user . RaiseMessage ( Properties . Resources . ScanPreliminaryInconsistent , next_command ) ;
371- }
372-
373- return Exit . ERROR ;
374- }
353+ RegistryManager . Instance ( inst , repoData ) . ScanUnmanagedFiles ( ) ;
354+ return Exit . OK ;
375355 }
376356
377357 private static int Clean ( NetModuleCache ? cache )
0 commit comments