From 727a25090dbb1d3a3a2c33153a12d9c25b4206de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 28 Feb 2017 12:04:40 +0000 Subject: [PATCH] might as well move append 'usage' into the msConfigPath from the start Change-Id: Ie8a15f1a20621ebdd00ab4ed195495e0acd111a5 --- sfx2/source/control/unoctitm.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 6e9946347b13..2191cd807392 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -496,7 +496,10 @@ public: { mbIsCollecting = bIsCollecting; if (mbIsCollecting) + { msConfigPath = SvtPathOptions().GetConfigPath(); + msConfigPath += "usage/"; + } } }; @@ -515,9 +518,7 @@ void UsageInfo::save() if (!mbIsCollecting) return; - OUString path(msConfigPath); - path += "usage/"; - osl::Directory::createPath(path); + osl::Directory::createPath(msConfigPath); //get system time information. TimeValue systemTime; @@ -532,7 +533,7 @@ void UsageInfo::save() //filename type: usage-YYYY-MM-DDTHH_MM_SS.csv OUString filename = "usage-" + OUString::createFromAscii(time) + ".csv"; - path += filename; + OUString path = msConfigPath + filename; osl::File file(path);