From 9fb7cb81dba70c52c65e729582843d8d327022b9 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 19 Oct 2016 19:14:58 +0200 Subject: [PATCH] Don't pass potentially remote path to Path.GetFileName. Refs #400 --- renderdocui/Windows/StatisticsViewer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdocui/Windows/StatisticsViewer.cs b/renderdocui/Windows/StatisticsViewer.cs index 542b2f158..54f51182f 100644 --- a/renderdocui/Windows/StatisticsViewer.cs +++ b/renderdocui/Windows/StatisticsViewer.cs @@ -744,7 +744,7 @@ namespace renderdocui.Windows float initDataMB = (float)frameInfo.initDataSize / (1024.0f * 1024.0f); string header = String.Format("Stats for {0}.\n\nFile size: {1:N2}MB ({2:N2}MB uncompressed, compression ratio {3:N2}:1)\nPersistent Data (approx): {4:N2}MB, Frame-initial data (approx): {5:N2}MB\n", - Path.GetFileName(m_Core.LogFileName), compressedMB, uncompressedMB, compressRatio, persistentMB, initDataMB); + Helpers.SafeGetFileName(m_Core.LogFileName), compressedMB, uncompressedMB, compressRatio, persistentMB, initDataMB); string draws = String.Format("Draw calls: {0}\nDispatch calls: {1}\n", drawCount, dispatchCount); string calls = AppendAPICallSummary(frameInfo, numAPIcalls);