Because 'cp' is used to copy the file backup will fail on a Windows platform. Reproducible: Always Steps to Reproduce: Try to backup a file. Actual Results: The backup will fail. Expected Results: The backup should not fail. A workaround this issue is to extract cp.exe from the unixtools package http://sourceforge.net/projects/unxutils/files/unxutils/current/UnxUtils.zip/download and place it in the KDE on windows installation folder in the same directory as kmymoney.exe.
The cp.exe is localte in 'usr/local/wbin' in the given archive.
This is fixed in the standalone kmymoney installer.
Thanks for this fix which has the disadvantage to have a dependency to a 3rdparty tool. I'm going to fix this by using the windows build in copy command.
Git commit d5674713e0c6ce002f54a5e894f22f77b5109b64 by Ralf Habacker. Committed on 05/07/2017 at 14:51. Pushed by habacker into branch '4.8'. Fix 'Backup can't be performed on Windows' Avoid the need of a 3rdparty tool to support file backup on windows by using build in copy command. FIXED-IN:4.8.1 M +7 -3 kmymoney/kmymoney.cpp https://commits.kde.org/kmymoney/d5674713e0c6ce002f54a5e894f22f77b5109b64
Wow, why is this using an external command at all? Surely it can be copied in-process? There is a QFile::copy method...
And ever heard of this thing called KIO? :)
(In reply to Nicolás Alvarez from comment #5) > Wow, why is this using an external command at all? I did not wrote this stuff and git log does not show anything related, so I don't know. May be some of the long time contributors is able to give some insides. > Surely it can be copied in-process? There is a QFile::copy method... The current implementation is bound to call external tools and would require to rewrite the whole stuff.
Git commit da03f3b25c3a193b6ea0e9c9c08abe406ecdc97e by Ralf Habacker. Committed on 06/07/2017 at 08:19. Pushed by habacker into branch '4.8'. Disable mount box in the backup dialog on Windows Visible devices are always mounted. M +3 -0 kmymoney/kmymoney.cpp https://commits.kde.org/kmymoney/da03f3b25c3a193b6ea0e9c9c08abe406ecdc97e
Git commit 72e1d03928de7534fc02a66610fb077765ec5215 by Ralf Habacker. Committed on 06/07/2017 at 08:19. Pushed by habacker into branch '4.8'. On Windows if backup file exists make sure that it will be overwritten M +1 -1 kmymoney/kmymoney.cpp https://commits.kde.org/kmymoney/72e1d03928de7534fc02a66610fb077765ec5215
(In reply to Kevin Funk from comment #6) > And ever heard of this thing called KIO? :) Would probably be better as using QFile because there is a gui included but needs nearly the same refactoring as mentioned in comment 7.
(In reply to Ralf Habacker from comment #10) > (In reply to Kevin Funk from comment #6) > > And ever heard of this thing called KIO? :) > Would probably be better as using QFile because there is a gui included but > needs nearly the same refactoring as mentioned in comment 7. Just a KIO related question: any idea if the windows implementations of KIO::mount() is able to mount windows or samba share and does it provide a dialog for optional requesting username and passwords ? I did not found any related hint at https://api.kde.org/frameworks/kio/html/namespaceKIO.html#a13bf133780931faa4a00d68824cadbcd
Git commit dc068d874c3eb06c71aad8bf1d2521e7cc8b759d by Ralf Habacker. Committed on 06/07/2017 at 20:23. Pushed by habacker into branch '4.8'. The Windows build in copy command does not like '/' as separator. Still need to find a way to get rid of the required 'true.exe'. M +2 -1 kmymoney/kmymoney.cpp https://commits.kde.org/kmymoney/dc068d874c3eb06c71aad8bf1d2521e7cc8b759d
Git commit c514b4ccafc0e86ee2f9ec70b73bd6c4d3b11d45 by Ralf Habacker. Committed on 06/07/2017 at 20:23. Pushed by habacker into branch '4.8'. On creating backup files get rid of requirement to true.exe on Windows M +17 -2 kmymoney/kmymoney.cpp https://commits.kde.org/kmymoney/c514b4ccafc0e86ee2f9ec70b73bd6c4d3b11d45
(In reply to Ralf Habacker from comment #7) Note the original bug and fix were from 2012, so before git, and maybe even KDE3. It does not seem to make sense to put more effort to this until it can be re-written to use KIO, probably for version 5. Should someone open a separate bug/wish list for that?
Git commit d6027c835211f9b381e0d2e5f629c0aad15c1f9c by Ralf Habacker. Committed on 10/07/2017 at 09:37. Pushed by habacker into branch '4.8'. Move out backup related actions like mount, write, unmount and finish into separate methods This makes the implementation easier to understand and reduces the number of duplicated implementations. M +80 -95 kmymoney/kmymoney.cpp M +29 -5 kmymoney/kmymoney.h https://commits.kde.org/kmymoney/d6027c835211f9b381e0d2e5f629c0aad15c1f9c
Git commit be3dfc7d78cda1794a4597abe7f0fa13b5a375bc by Thomas Baumgart. Committed on 05/11/2018 at 15:36. Pushed by tbaumgart into branch '5.0'. Provide all arguments separately All arguments to the copy command need to be presented as their own element in the argument list. The current code resulted in an invalid source filename with "+ nul" appended. M +1 -1 kmymoney/kmymoney.cpp https://commits.kde.org/kmymoney/be3dfc7d78cda1794a4597abe7f0fa13b5a375bc