From 3d402524355bbcc7a5fc9114834436879b7b19ac Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 21 Apr 2010 13:29:21 +0200 Subject: 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 --- src/corelib/io/qsettings.cpp | 4 +--- 1 file changed, 1 insertion(+), 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; } -- cgit v0.12