@@ -30,6 +30,10 @@ public int Analyze(string path, string databaseName, string searchPattern, bool
30
30
int lastLength = 0 ;
31
31
foreach ( var file in files )
32
32
{
33
+ // Automatically ignore these annoying OS X style files meta files.
34
+ if ( Path . GetFileName ( file ) == ".DS_Store" )
35
+ continue ;
36
+
33
37
try
34
38
{
35
39
UnityArchive archive = null ;
@@ -44,9 +48,11 @@ public int Analyze(string path, string databaseName, string searchPattern, bool
44
48
45
49
var relativePath = Path . GetRelativePath ( path , file ) ;
46
50
47
- Console . Write ( $ "\r Processing { i * 100 / files . Length } % ({ i } /{ files . Length } ) { file } ") ;
48
-
49
51
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 ;
50
56
}
51
57
52
58
if ( archive != null )
@@ -71,22 +77,29 @@ public int Analyze(string path, string databaseName, string searchPattern, bool
71
77
}
72
78
catch ( Exception e )
73
79
{
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 ( ) ;
75
83
}
76
84
}
77
85
}
78
86
}
79
87
finally
80
88
{
89
+ Console . Write ( $ "\r { new string ( ' ' , lastLength ) } ") ;
81
90
writer . EndAssetBundle ( ) ;
82
91
archive . Dispose ( ) ;
83
92
}
84
93
}
85
94
}
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 )
87
100
{
88
101
Console . Error . WriteLine ( ) ;
89
- Console . Error . WriteLine ( $ "Error processing file { file } ! ") ;
102
+ Console . Error . WriteLine ( $ "Error processing file: { file } ") ;
90
103
Console . Write ( $ "{ e . GetType ( ) } : ") ;
91
104
Console . WriteLine ( e . Message ) ;
92
105
Console . WriteLine ( e . StackTrace ) ;
0 commit comments