On Thursday 21 March 2013 19:02:13 David Faure wrote: > I'm afraid it's one or the other: > * safe code, always a working file available, but hardlinks get splitted up > * possibility to corrupt the existing file, but a backup exists; hardlinks > are kept.
OK, bug number 2, saving into a non-writable directory, also leads to the above issue: no way to use the "safe code". So I implemented direct-overwrite for the case of a non-writable directory. https://codereview.qt-project.org/52059 If this is approved, then the same solution could be used to preserve hardlinks.... and to preserve the owner if different from the current user, for bug number 3. In bug number 2 there was a suggestion of "finding another writable directory in the same partition and moving the file from there", but it seems rather difficult to find such a directory in general, and it wouldn't help with bugs 1 and 3 anyway. -- David Faure, [email protected], http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5
