diff options
author | Christian Kamm <christian.d.kamm@nokia.com> | 2010-04-21 11:29:21 (GMT) |
---|---|---|
committer | Christian Kamm <christian.d.kamm@nokia.com> | 2010-04-21 11:29:21 (GMT) |
commit | 3d402524355bbcc7a5fc9114834436879b7b19ac (patch) | |
tree | 651ced89e2d4f1d568849ba2dbfa040f416bedea | |
parent | c74dac2a0ef5d1b428c4da4e48fab05f9886233a (diff) | |
download | Qt-3d402524355bbcc7a5fc9114834436879b7b19ac.zip Qt-3d402524355bbcc7a5fc9114834436879b7b19ac.tar.gz Qt-3d402524355bbcc7a5fc9114834436879b7b19ac.tar.bz2 |
QSettings: Fix isWritable incorrectly returning true on linux.
When the target directory exists and is readable, QConfFile::isWritable
used to returned true, even though the actual config file was not
necessarily writable.
Reviewed-by: joerg
-rw-r--r-- | src/corelib/io/qsettings.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp index 64015ce..9562f58 100644 --- a/src/corelib/io/qsettings.cpp +++ b/src/corelib/io/qsettings.cpp @@ -252,9 +252,7 @@ bool QConfFile::isWritable() const } else { // Create the directories to the file. QDir dir(fileInfo.absolutePath()); - if (dir.exists() && dir.isReadable()) { - return true; - } else { + if (!dir.exists()) { if (!dir.mkpath(dir.absolutePath())) return false; } |