Commit 17c88cb2 authored by Fawzi Mohamed's avatar Fawzi Mohamed

filemanager: fix regression when trying to save read-only file

When saving a read-only file, a dialog should appear with
Make Writable / Save As / Cancel should open.
Avoids relying on permission error to detect read-only files as
qfsfileengine_unix.cpp treats errno == EACCESS as a QFile::OpenError.

Change-Id: Icdffdc4617c8ef2b58d58aeedbb2b454d0da9465
Task-Number: QTCREATORBUG-5066
Reviewed-on: default avatarQt Sanity Bot <>
Reviewed-by: default avatarFawzi Mohamed <>
parent 914f12ba
......@@ -628,8 +628,7 @@ bool FileManager::saveFile(IFile *file, const QString &fileName, bool *isReadOnl
if (isReadOnly) {
QFile ofi(effName);
// Check whether the existing file is writable
if (ofi.exists() && !
&& ofi.error() == QFile::PermissionsError) {
if (! && {
*isReadOnly = true;
goto out;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment