Kolourpaint cannot save when it cannot create a temporary file. If the file is writable but the directory is not, it should fallback to overwriting the file directly instead of failing to save the file. It's a bigger issue when using Kio such as fish or ftp where the target directory is owner by a remote user. To reproduce: mkdir foo sudo chown root:root foo sudo wget http://nicecatpicture foo/cat.png sudo chmod 666 foo/* kolourpaint foo/*.png <ctrl+s> Result: Fail to save file with an error Expect: Save file, with or without a warning
The way it's implemented right now is done to ensure an always intact image file: "write all or nothing". It's using Qt's QSaveFile: ########## QSaveFile is an I/O device for writing text and binary files, without losing existing data if the writing operation fails. While writing, the contents will be written to a temporary file, and if no error happened, commit() will move it to the final file. This ensures that no data at the final file is lost in case an error happens while writing, and no partially-written file is ever present at the final location. Always use QSaveFile when saving entire documents to disk. ##########