@@ -1981,9 +1981,18 @@ void RefreshBuildReports()
1981
1981
singleReport . ElapsedTimeMS = long . Parse ( ms ) ;
1982
1982
collectedBuildTime = true ;
1983
1983
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
+ }
1987
1996
1988
1997
// add all rows and stat rows for this build report
1989
1998
buildReports . Add ( singleReport ) ;
@@ -2062,7 +2071,7 @@ void RefreshBuildReports()
2062
2071
}
2063
2072
}
2064
2073
}
2065
- catch ( Exception )
2074
+ catch ( Exception e )
2066
2075
{
2067
2076
gridBuildReport . ItemsSource = null ;
2068
2077
gridBuildReport . Items . Clear ( ) ;
@@ -2073,7 +2082,8 @@ void RefreshBuildReports()
2073
2082
txtBuildTime . Text = "" ;
2074
2083
2075
2084
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.." ) ;
2077
2087
return ;
2078
2088
}
2079
2089
0 commit comments