https://bugs.kde.org/show_bug.cgi?id=360940

            Bug ID: 360940
           Summary: Cannot save file
           Product: kwordquiz
           Version: unspecified
          Platform: Kubuntu Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: grave
          Priority: NOR
         Component: general
          Assignee: pe...@peterandlinda.com
          Reporter: michael.g...@gmail.com

When trying to save or saveas a file, an error occurs and the file is not
saved.

Reproducible: Always


Actual Results:  
Error: The file is not writable

or: The file is locked by another process.

Expected Results:  
The file is saved.

The error occurs on Kubuntu 15.10 and did not occur in 12.04.

FIX: use url.toLocalFile() instead of url in save method

With the patch below the source compiles and saving files is again possible.

diff --git a/src/kwordquiz.cpp b/src/kwordquiz.cpp
index ccbc5ef..e655d93 100644
--- a/src/kwordquiz.cpp
+++ b/src/kwordquiz.cpp
@@ -919,7 +919,7 @@ bool KWordQuizApp::saveDocAsFileName(KEduVocDocument
*document)
       else {
         if (m_dirWatch->contains(document->url().toLocalFile()))
           m_dirWatch->removeFile(document->url().toLocalFile());
-        result = document->saveAs(url, KEduVocDocument::Automatic);
+        result = document->saveAs(url.toLocalFile(),
KEduVocDocument::Automatic);
         if (result == KEduVocDocument::NoError) {
           m_dirWatch->addFile(url.path());
           fileOpenRecent->addUrl(url);

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to