At bug 302945 creating a backup file on Windows has been fixed. Testing this function with the 4.8.1 snapshots on Windows (see bug 380075 for getting snapshots) shows a difference compared to the linux implementation. The difference is that on Windows the modify time stamp shows the modification time of the original kmymoney file. This modification time is displayed in the explorer and let people think that this backup is not up to date which may be irritating. How to reproduce: 1. start kmymoney 2. open kmymoney file if not open 3. select file->backup and make a backup What happens ? The newly created file shows the mentioned behavior What is expected ? The modification time of the newly created file should have the same value as the creating time.
This looks like a Windows feature, so Windows users should not be irritated. It's the Linux user on Windows who is irritated (and vice versa). C:\Users\thomas.baumgart>copy Thumbs.db bla.bla 1 Datei(en) kopiert. C:\Users\thomas.baumgart>dir Thumbs.db bla.bla Volume in Laufwerk C: hat keine Bezeichnung. Volumeseriennummer: 8C43-1CC6 Verzeichnis von C:\Users\thomas.baumgart 23.04.2013 19:23 6.656 Thumbs.db Verzeichnis von C:\Users\thomas.baumgart 23.04.2013 19:23 6.656 bla.bla 2 Datei(en), 13.312 Bytes
'copy /b backup+ ,,' after doing the backup will update the file time. The commas indicate absence of destination, so the file isn't actually copied, but timestamp is modified in place. (found from a post on superuser.com, pointing to docs on technet.microsoft.com, which has more than "help copy" shows.
Note I do not know if this behavior is different on different versions of Windows. My example works on Windows 7.
https://superuser.com/questions/10426/windows-equivalent-of-the-linux-command-touch seems to be that link. I have to admit: absolutely intuitive. I can confirm though that it works with Win10 also in case that is of help to anyone.
Git commit 5cf2e46c185098bbd141cf4f80693df19edb48af by Ralf Habacker. Committed on 13/07/2017 at 09:38. Pushed by habacker into branch '4.8'. Fix 'Irritating backup file modification time on Windows' MS way to touch modification date of a copied file is to append '+nul' to the source filename. FIXED-IN:4.8.1 M +2 -2 kmymoney/kmymoney.cpp https://commits.kde.org/kmymoney/5cf2e46c185098bbd141cf4f80693df19edb48af