SUMMARY When opening an autosave of a previously unsaved document, Krita tries to save the autosave file to the Pictures directory. If the directory does not exist, the save operation fails. STEPS TO REPRODUCE 1. Create a new document, do NOT save 2. Make some marks 3. Wait for autosave 4. Kill Krita 5. Reopen Krita 6. Click OK to recover the autosave OBSERVED RESULT The autosave file is opened, but it produces a dialog with following error: Could not save [...home directory...]/Pictures/.krita-66481-document_0-autosave.kra Reason: Cannot open file for writing. Reason: The file could not be opened.
I have a non-standard location for the Pictures folder and in that situation, the autosave file is written into the Pictures folder. (So where is the file path obtained from?) If I then make a change to the image in krita and Save it to the desktop and Quit, the autosave file remains in the Pictures folder. When I tried this, there was another autosave file in Pictures from a previous 'incident' in April. This also happens with version 4.2.9.
The last issue sounds like https://bugs.kde.org/show_bug.cgi?id=363971 ?
Curious... I took over this issue from Tiar, because she's on vacation, but I cannot reproduce it.
I observed the issue while running the AppImage with isolated config and home directories for testing (https://invent.kde.org/snippets/741). In that case, XDG_PICTURES_DIR is set to system-wide default, which is $HOME/Pictures. However, the Pictures directory does not exist within the home dir. Another option to trigger the error is to temporarily change XDG_PICTURES_DIR (on my Ubuntu it is in ~/.config/user-dirs.dirs).
On debian 10 MATE, I've noticed that if you change XDG_PICTURES_DIR then you need to Kill Caja (it will restart) to update the folders to the user-dirs.dirs entries. The autosave file in this situation is initially written to the $HOME folder. The question would be why is it moved to the Pictures folder after you say OK to opening it? Also, why is it not deleted from there if you Save As after working on it? This seems to be a more particular and Linux specific variant of https://bugs.kde.org/show_bug.cgi?id=363971
Git commit d2047f00bdcf0ec2d56ff571a168e61c83b8a78b by Boudewijn Rempt. Committed on 25/05/2020 at 11:35. Pushed by rempt into branch 'krita/4.3'. Don't use the autosave filename from unsaved documents as the proposed saving name This also checks whether the Pictures folder really exists, and uses the home folder if it doesn't. M +13 -4 libs/ui/KisMainWindow.cpp https://invent.kde.org/graphics/krita/commit/d2047f00bdcf0ec2d56ff571a168e61c83b8a78b
Git commit 2cd0fbba741f98447f30ad56419cf41badeb128c by Boudewijn Rempt. Committed on 25/05/2020 at 11:36. Pushed by rempt into branch 'master'. Don't use the autosave filename from unsaved documents as the proposed saving name This also checks whether the Pictures folder really exists, and uses the home folder if it doesn't. (cherry picked from commit d2047f00bdcf0ec2d56ff571a168e61c83b8a78b) M +13 -4 libs/ui/KisMainWindow.cpp https://invent.kde.org/graphics/krita/commit/2cd0fbba741f98447f30ad56419cf41badeb128c
Actually, that commit should have closed this bug...