Kaydet (Commit) a064f122 authored tarafından Caolán McNamara's avatar Caolán McNamara
üst 3830059b
......@@ -472,6 +472,9 @@ class UsageInfo {
/// Command vs. how many times it was used
UsageMap maUsage;
/// config path, get it long before atexit time
OUString msConfigPath;
public:
UsageInfo() : mbIsCollecting(false)
{
......@@ -489,7 +492,12 @@ public:
void save();
/// Modify the flag whether we are collecting.
void setCollecting(bool bIsCollecting) { mbIsCollecting = bIsCollecting; }
void setCollecting(bool bIsCollecting)
{
mbIsCollecting = bIsCollecting;
if (mbIsCollecting)
msConfigPath = SvtPathOptions().GetConfigPath();
}
};
void UsageInfo::increment(const OUString &rCommand)
......@@ -507,7 +515,7 @@ void UsageInfo::save()
if (!mbIsCollecting)
return;
OUString path(SvtPathOptions().GetConfigPath());
OUString path(msConfigPath);
path += "usage/";
osl::Directory::createPath(path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment