summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qfile.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index a0bd8b4..10b812b 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -748,8 +748,11 @@ QFile::rename(const QString &newName)
}
if (error)
out.remove();
- else
+ else {
+ setPermissions(permissions());
+ unsetError();
setFileName(newName);
+ }
close();
return !error;
}