Bug 359686

Summary: "Save Incremental Version" leaves temporary/autosave files on disk
Product: [Applications] krita Reporter: Ivan Dobrokotov <dobrokot>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: 2.9.11   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Ivan Dobrokotov 2016-02-22 23:20:46 UTC
Due "undo" restrictions (it saves old versions of file in volatile memory only, which are purged when computer is off) I like to use a "Save Incremental Version" feature.

( I prefer to have unlimited and persistent undo with date/time history, which can be stored in file near main project file, this will allow to remove one "File" entry and remove one user option about undo limit and allow to easy recover without manual  "Ctrl + Alt + S"/F4 every hour )

"Save Incremental Version"  now has the following issues:
1)  It leaves a lot of files with ".*-autosave.kra" and "*.kra~" names after every incremental save 

2a) It does not insert into "File -> Open Recent" last version of file, so I need always to open from OS shell last version ( I expect to open last saved file  from this menu )
2b) It over-populates "File -> Open Recent"  with manually opened versions (not sure about what proper and what I expect)

List of files in the directory when "Incremental Save" is used:
-rwxrwx---+ 1 johnsmith None 34M Feb 22 03:32 my_cat_120.kra~
-rwxrwx---+ 1 johnsmith None 33M Feb 22 04:06 my_cat_120.kra
-rwxrwx---+ 1 johnsmith None 30M Feb 22 04:43 .my_cat_120.kra-autosave.kra
-rwxrwx---+ 1 johnsmith None 33M Feb 22 04:44 my_cat_121.kra~
-rwxrwx---+ 1 johnsmith None 33M Feb 22 04:46 my_cat_121.kra
-rwxrwx---+ 1 johnsmith None 31M Feb 22 07:35 .my_cat_121.kra-autosave.kra
-rwxrwx---+ 1 johnsmith None 35M Feb 22 07:35 my_cat_122.kra
-rwxrwx---+ 1 johnsmith None 31M Feb 22 07:41 .my_cat_122.kra-autosave.kra
-rwxrwx---+ 1 johnsmith None 35M Feb 22 07:42 my_cat_123.kra
-rwxrwx---+ 1 johnsmith None 31M Feb 22 07:56 .my_cat_123.kra-autosave.kra
-rwxrwx---+ 1 johnsmith None 35M Feb 22 07:56 my_cat_124.kra
-rwxrwx---+ 1 johnsmith None 31M Feb 22 08:04 .my_cat_124.kra-autosave.kra
-rwxrwx---+ 1 johnsmith None 35M Feb 22 08:04 my_cat_125.kra
-rwxrwx---+ 1 johnsmith None 31M Feb 22 20:39 .my_cat_125.kra-autosave.kra
-rwxrwx---+ 1 johnsmith None 35M Feb 22 20:39 my_cat_126.kra
-rwxrwx---+ 1 johnsmith None 31M Feb 22 21:37 .my_cat_126.kra-autosave.kra
-rwxrwx---+ 1 johnsmith None 35M Feb 22 21:37 my_cat_127.kra
-rwxrwx---+ 1 johnsmith None 32M Feb 22 21:38 .my_cat_127.kra-autosave.kra
-rwxrwx---+ 1 johnsmith None 35M Feb 22 21:39 my_cat_128.kra
-rwxrwx---+ 1 johnsmith None 35M Feb 22 21:41 my_cat_129.kra
-rwxrwx---+ 1 johnsmith None 35M Feb 22 21:42 my_cat_130.kra
-rwxrwx---+ 1 johnsmith None 31M Feb 23 00:26 .my_cat_130.kra-autosave.kra
-rwxrwx---+ 1 johnsmith None 34M Feb 23 00:27 my_cat_131.kra~
-rwxrwx---+ 1 johnsmith None 36M Feb 23 00:40 my_cat_131.kra


 I can't remember why I use Ctrl+Alt+S instead "Incremental backup (F4) ", backup had some other issues, but I can't remember which.





Reproducible: Always

Steps to Reproduce:

It seems it binded to autosave timeouts. 
So it needs some minutes to reproduce.

To reproduce: draw something for five minutes, and press Ctrl+Alt+Save every minute.
Comment 1 Halla Rempt 2016-03-22 16:10:36 UTC
Yes, I can observe this behavior. Regular save removes the autosave files, save incremental doesn't, because it does a save-as. I am hesitating to change this code, though, since it could easily lead to dataloss because of the way incremental-save has been implemented.
Comment 2 Halla Rempt 2018-09-06 14:44:36 UTC

*** This bug has been marked as a duplicate of bug 363971 ***