Blame SOURCES/kate-allow-to-save-files-in-readonly-directory.patch

326678
diff --git a/part/buffer/katetextbuffer.cpp b/part/buffer/katetextbuffer.cpp
326678
index 6c0c80f..34e93be 100644
326678
--- a/part/buffer/katetextbuffer.cpp
326678
+++ b/part/buffer/katetextbuffer.cpp
326678
@@ -719,7 +719,10 @@ bool TextBuffer::save (const QString &filename)
326678
    * use KSaveFile for save write + rename
326678
    */
326678
   KSaveFile saveFile (filename);
326678
-  if (!saveFile.open())
326678
+
326678
+  saveFile.setDirectWriteFallback(true);
326678
+
326678
+  if (!saveFile.open(QIODevice::WriteOnly | QIODevice::Truncate))
326678
     return false;
326678
326678
   /**
326678
@@ -734,7 +737,7 @@ bool TextBuffer::save (const QString &filename)
326678
    * try to open, if new file
326678
    */
326678
   if (deleteFile) {
326678
-    if (!file->open (QIODevice::WriteOnly)) {
326678
+    if (!file->open (QIODevice::WriteOnly | QIODevice::Truncate)) {
326678
       delete file;
326678
       return false;
326678
     }