@@ -1981,9 +1981,18 @@ void RefreshBuildReports()
19811981 singleReport . ElapsedTimeMS = long . Parse ( ms ) ;
19821982 collectedBuildTime = true ;
19831983
1984- // get streamingassets folder size and add to report, NOTE need to recalculate sizes then?
1985- long streamingAssetFolderSize = Tools . GetFolderSizeInBytes ( Path . Combine ( currentBuildReportProjectPath , "Assets" , "StreamingAssets" ) ) ;
1986- singleReport . Stats . Insert ( singleReport . Stats . Count - 1 , new BuildReportItem ( ) { Category = "StreamingAssets" , Size = Tools . GetBytesReadable ( streamingAssetFolderSize ) } ) ;
1984+ if ( string . IsNullOrEmpty ( currentBuildReportProjectPath ) == false )
1985+ {
1986+ // get streamingassets folder size and add to report, NOTE need to recalculate sizes then?
1987+ string streamingAssetPath = Path . Combine ( currentBuildReportProjectPath , "Assets" , "StreamingAssets" ) ;
1988+ var streamingAssetFolderSize = Tools . GetFolderSizeInBytes ( streamingAssetPath ) ;
1989+ singleReport . Stats . Insert ( singleReport . Stats . Count - 1 , new BuildReportItem ( ) { Category = "StreamingAssets" , Size = Tools . GetBytesReadable ( streamingAssetFolderSize ) } ) ;
1990+ }
1991+ else
1992+ {
1993+ // this can happen if editor log file was overwritten with another running editor? (so that start of the log file doesnt contain project path)
1994+ Console . WriteLine ( "Failed to get project path from build report.." ) ;
1995+ }
19871996
19881997 // add all rows and stat rows for this build report
19891998 buildReports . Add ( singleReport ) ;
@@ -2062,7 +2071,7 @@ void RefreshBuildReports()
20622071 }
20632072 }
20642073 }
2065- catch ( Exception )
2074+ catch ( Exception e )
20662075 {
20672076 gridBuildReport . ItemsSource = null ;
20682077 gridBuildReport . Items . Clear ( ) ;
@@ -2073,7 +2082,8 @@ void RefreshBuildReports()
20732082 txtBuildTime . Text = "" ;
20742083
20752084 Console . WriteLine ( "Failed to open editor log or other error in parsing: " + logFile ) ;
2076- SetStatus ( "Failed to open editor log or other error in parsing: " + logFile ) ;
2085+ Console . WriteLine ( e ) ;
2086+ SetStatus ( "Failed to open editor log or other parsing error.." ) ;
20772087 return ;
20782088 }
20792089
0 commit comments