diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-24 11:38:13 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-25 10:45:27 +0000 |
commit | 838b77f5f3d6d8fd98891e99a23ff78a6a357cb2 (patch) | |
tree | ed43d6be36f80ffc9fb90b61bd7189451105e03b /framework | |
parent | 1e0541fadf847e30053c0d8b29f90bdfaecd6be6 (diff) |
Resolves: rhbz#1065807 use xdg ~/Templates for default Template location
(if it exists)
Change-Id: I98fc9fd54d1f56c8bed24ce4d2ebf53756ded2cc
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/services/pathsettings.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index 90d61d2b6b13..105c5a6fb3f8 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -644,6 +644,12 @@ PathSettings::PathInfo PathSettings::impl_readNewFormat(const OUString& sPath) // read the writeable path xPath->getByName(CFGPROP_WRITEPATH) >>= aPathVal.sWritePath; + // avoid duplicates, by removing the writeable path from + // the user defined path list if it happens to be there too + OUStringList::iterator aI = aPathVal.lUserPaths.find(aPathVal.sWritePath); + if (aI != aPathVal.lUserPaths.end()) + aPathVal.lUserPaths.erase(aI); + // read state props xPath->getByName(CFGPROP_ISSINGLEPATH) >>= aPathVal.bIsSinglePath; |