<p dir="ltr">Agreed, though not a developer here, don't delete my file from disk before a new one is saved. I prefer a message that tells me I'm out if disk space so I can clean up or select another location.</p>
<p dir="ltr">/Jonathan<br></p>
<p dir="ltr">    </p>
<div class="gmail_extra"><br><div class="gmail_quote">Den 16 aug. 2016 18:12 skrev "Boudewijn Rempt" <<a href="mailto:boud@valdyas.org">boud@valdyas.org</a>>:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, 16 Aug 2016, Dmitry Kazakov wrote:<br>
<br>
> Can we somehow limit this behavior to network files only?<br>
<br>
I would prefer not to. This also solves the issue we've seen where a<br>
failure to save breaks the original file. In fact, this is how saving<br>
should have been implemented already, and as I thought it had been<br>
implemented.<br>
<br>
You never directly overwrite an existing file, you always save to a<br>
temporary file and then let the OS do the copy. Anything else is a bug.<br>
<br>
> There are two problems I see:<br>
><br>
> 1) If some other application, like Blender, is waiting on Krita-edited file<br>
> with inotify (QFileSystemWatcher), it may go crazy when we rename and<br>
> delete the file. The inotify opject will be destroyed after that.<br>
<br>
Did you test that, or is this just a hunch?<br>
<br>
> 2) What if the user works with 700MiB image? It mean he needs twice the<br>
> size of the image free space just to be able to save it. Many people will<br>
> be unhappy with it.<br>
<br>
But far fewer people than are currently unhappy because our unsafe saving<br>
code breaks their files. And if the file hasn't been saved before there is<br>
no extra disk space needed,<br>
<br>
> 3) What if there is not enough free space in Temp folder? The user will<br>
> never be able to save the image? That is a dataloss bug.<br>
<br>
Then they get an error message and can clean out their temp folder.<br>
<br>
But they WILL NOT LOSE THEIR ORIGINAL FILE. And that is what counts.<br>
<br>
And as I said, this is how saving was supposed to happen anyway.<br>
--<br>
Boudewijn Rempt | <a href="http://www.krita.org" rel="noreferrer" target="_blank">http://www.krita.org</a>, <a href="http://www.valdyas.org" rel="noreferrer" target="_blank">http://www.valdyas.org</a><br>
</blockquote></div></div>