@@ -30,6 +30,10 @@ public int Analyze(string path, string databaseName, string searchPattern, bool
3030 int lastLength = 0 ;
3131 foreach ( var file in files )
3232 {
33+ // Automatically ignore these annoying OS X style files meta files.
34+ if ( Path . GetFileName ( file ) == ".DS_Store" )
35+ continue ;
36+
3337 try
3438 {
3539 UnityArchive archive = null ;
@@ -44,9 +48,11 @@ public int Analyze(string path, string databaseName, string searchPattern, bool
4448
4549 var relativePath = Path . GetRelativePath ( path , file ) ;
4650
47- Console . Write ( $ "\r Processing { i * 100 / files . Length } % ({ i } /{ files . Length } ) { file } ") ;
48-
4951 writer . WriteSerializedFile ( relativePath , file , Path . GetDirectoryName ( file ) ) ;
52+
53+ var message = $ "Processing { i * 100 / files . Length } % ({ i } /{ files . Length } ) { file } ";
54+ Console . Write ( $ "\r Processing { i * 100 / files . Length } % ({ i } /{ files . Length } ) { file } ") ;
55+ lastLength = message . Length ;
5056 }
5157
5258 if ( archive != null )
@@ -71,22 +77,29 @@ public int Analyze(string path, string databaseName, string searchPattern, bool
7177 }
7278 catch ( Exception e )
7379 {
74- Console . Error . WriteLine ( $ "Error processing { node . Path } in archive { file } ") ;
80+ Console . Error . WriteLine ( $ "\r Error processing { node . Path } in archive { file } { new string ( ' ' , Math . Max ( 0 , lastLength - message . Length ) ) } ") ;
81+ Console . Error . WriteLine ( e ) ;
82+ Console . WriteLine ( ) ;
7583 }
7684 }
7785 }
7886 }
7987 finally
8088 {
89+ Console . Write ( $ "\r { new string ( ' ' , lastLength ) } ") ;
8190 writer . EndAssetBundle ( ) ;
8291 archive . Dispose ( ) ;
8392 }
8493 }
8594 }
86- catch ( Exception e )
95+ catch ( NotSupportedException ) {
96+ Console . Error . WriteLine ( ) ;
97+ //Console.Error.WriteLine($"File not supported: {file}"); // This is commented out because another codepath will output "failed to load"
98+ }
99+ catch ( Exception e )
87100 {
88101 Console . Error . WriteLine ( ) ;
89- Console . Error . WriteLine ( $ "Error processing file { file } ! ") ;
102+ Console . Error . WriteLine ( $ "Error processing file: { file } ") ;
90103 Console . Write ( $ "{ e . GetType ( ) } : ") ;
91104 Console . WriteLine ( e . Message ) ;
92105 Console . WriteLine ( e . StackTrace ) ;
0 commit comments