Mercurial > hg > svcore
comparison base/TempDirectory.cpp @ 733:b867c07478be
Simplify temporary directory path &c
author | Chris Cannam |
---|---|
date | Thu, 18 Aug 2011 11:36:23 +0100 |
parents | 1424aa29ae95 |
children | e802e550a1f2 |
comparison
equal
deleted
inserted
replaced
700:5117d7cf59ec | 733:b867c07478be |
---|---|
70 //!!! iffy | 70 //!!! iffy |
71 svDir.replace(QDir::home().absolutePath(), svDirParent); | 71 svDir.replace(QDir::home().absolutePath(), svDirParent); |
72 } | 72 } |
73 | 73 |
74 if (!QFileInfo(svDir).exists()) { | 74 if (!QFileInfo(svDir).exists()) { |
75 if (!QDir(svDirParent).mkdir(svDir)) { | 75 if (!QDir(svDirParent).mkpath(svDir)) { |
76 throw DirectoryCreationFailed(QString("%1 directory in %2") | 76 throw DirectoryCreationFailed(QString("%1 directory in %2") |
77 .arg(svDir).arg(svDirParent)); | 77 .arg(svDir).arg(svDirParent)); |
78 } | 78 } |
79 } else if (!QFileInfo(svDir).isDir()) { | 79 } else if (!QFileInfo(svDir).isDir()) { |
80 throw DirectoryCreationFailed(QString("%1 is not a directory") | 80 throw DirectoryCreationFailed(QString("%1 is not a directory") |