Commit d508fb00 authored by Christoph Cullmann's avatar Christoph Cullmann

backport crash fix for saving .gz and co files

BUG: 346404
BUG: 352152
parent b8160f7d
......@@ -720,7 +720,7 @@ bool TextBuffer::save (const QString &filename)
* use KSaveFile for save write + rename
*/
KSaveFile saveFile (filename);
#if KDE_IS_VERSION(4,10,3)
/**
* allow fallback if directory not writable
......@@ -728,7 +728,7 @@ bool TextBuffer::save (const QString &filename)
*/
saveFile.setDirectWriteFallback (true);
#endif
/**
* try to open or fail
*/
......@@ -748,7 +748,7 @@ bool TextBuffer::save (const QString &filename)
* try to open, if new file
*/
if (deleteFile) {
if (!file->open (QIODevice::WriteOnly | QIODevice::Truncate)) {
if (!file->open (QIODevice::WriteOnly)) {
delete file;
return false;
}
......
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