Mercurial > hg > svcore
changeset 733:b867c07478be
Simplify temporary directory path &c
author | Chris Cannam |
---|---|
date | Thu, 18 Aug 2011 11:36:23 +0100 |
parents | 5117d7cf59ec |
children | 66c3f4e060e9 |
files | base/ResourceFinder.cpp base/TempDirectory.cpp |
diffstat | 2 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/base/ResourceFinder.cpp Wed Aug 17 22:14:52 2011 +0100 +++ b/base/ResourceFinder.cpp Thu Aug 18 11:36:23 2011 +0100 @@ -75,8 +75,7 @@ } #else #ifdef Q_OS_MAC - list << QString("/Library/Application Support/%1/%2") - .arg(qApp->organizationName()) + list << QString("/Library/Application Support/%1") .arg(qApp->applicationName()); #else list << QString("/usr/local/share/%1") @@ -107,9 +106,8 @@ char *home = getenv("HOME"); if (!home || !home[0]) return ""; #ifdef Q_OS_MAC - return QString("%1/Library/Application Support/%2/%3") + return QString("%1/Library/Application Support/%2") .arg(home) - .arg(qApp->organizationName()) .arg(qApp->applicationName()); #else return QString("%1/.local/share/%2")
--- a/base/TempDirectory.cpp Wed Aug 17 22:14:52 2011 +0100 +++ b/base/TempDirectory.cpp Thu Aug 18 11:36:23 2011 +0100 @@ -72,7 +72,7 @@ } if (!QFileInfo(svDir).exists()) { - if (!QDir(svDirParent).mkdir(svDir)) { + if (!QDir(svDirParent).mkpath(svDir)) { throw DirectoryCreationFailed(QString("%1 directory in %2") .arg(svDir).arg(svDirParent)); }