<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>419082</bug_id>
          <alias>Richie</alias>
          <creation_ts>2020-03-21 20:07:59 +0000</creation_ts>
          <short_desc>Backup</short_desc>
          <delta_ts>2020-07-13 10:02:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kmymoney</product>
          <component>general</component>
          <version>5.0.6</version>
          <rep_platform>Windows CE</rep_platform>
          <op_sys>Microsoft Windows</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter>richardwcave</reporter>
          <assigned_to name="KMyMoney Devel Mailing List">kmymoney-devel</assigned_to>
          <cc>gilles.lefebvre5001</cc>
    
    <cc>john</cc>
    
    <cc>me</cc>
          
          <cf_commitlink>https://commits.kde.org/kmymoney/c195e0cda57949891207f5c7f2c817d2b6fbe298</cf_commitlink>
          <cf_versionfixedin>5.1.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1917359</commentid>
    <comment_count>0</comment_count>
    <who name="">richardwcave</who>
    <bug_when>2020-03-21 20:07:59 +0000</bug_when>
    <thetext>SUMMARY
Use file-backup but fails to backup

STEPS TO REPRODUCE
1. file/backup
2. Enter Mount point e.g. E:/users/...etc
3. tick box &apos;mount this directory before backup

OBSERVED RESULT
KMyMoney indicates progess bar &apos;Mounting E:/User/...etc&apos; but the task freezes and I have to abort program using windows task manager

EXPECTED RESULT
Backup of file to windows director specified

SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
Re-downloaded KMyMoney 5.0.6 again and re-installed but same bug is present</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917360</commentid>
    <comment_count>1</comment_count>
    <who name="Jack">ostroffjh</who>
    <bug_when>2020-03-21 20:27:55 +0000</bug_when>
    <thetext>Is E: already mounted?  If so, no need to tick the &quot;mount&quot; checkbox.  If it is NOT already mounted, then what is it?  Samba, NFS, USB stick, ...?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917361</commentid>
    <comment_count>2</comment_count>
    <who name="">richardwcave</who>
    <bug_when>2020-03-21 20:44:57 +0000</bug_when>
    <thetext>Hi
I&apos;ve tried both ticked and unticked.

KMyMoney installed on C:
I&apos;m trying to backup to already mounted drive E: which is installed and mounted in PC

Either ticked or unticked, the backup freezes.

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917362</commentid>
    <comment_count>3</comment_count>
    <who name="">richardwcave</who>
    <bug_when>2020-03-21 20:46:30 +0000</bug_when>
    <thetext>Sorry forgot to say E: is a NTFS local disk installed on PC</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917383</commentid>
    <comment_count>4</comment_count>
    <who name="Jack">ostroffjh</who>
    <bug_when>2020-03-21 23:30:59 +0000</bug_when>
    <thetext>So E: is just a normal local hard disk?  Can you run KMyMoney from a command line to see if it gives any hints what it&apos;s waiting for?  Are the permissions OK on the folder to which you are trying to back up?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917414</commentid>
    <comment_count>5</comment_count>
    <who name="">richardwcave</who>
    <bug_when>2020-03-22 08:35:15 +0000</bug_when>
    <thetext>Yes, E: is just a normal local hard disk and I get a dialog box saying file backup error.
I&apos;m not a developer so I&apos;ve reverted back to KMyMoney v4.6.4, which works perfectly and backs up without a hitch. 
I am not confident using v5 until such a critical error is fixed.
Thank you and bye</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917449</commentid>
    <comment_count>6</comment_count>
    <who name="Thomas Baumgart">tbaumgart</who>
    <bug_when>2020-03-22 13:31:08 +0000</bug_when>
    <thetext>I tried this using Version 5.0.7-f8ae85c34 (the current is 5.0.8-029de4701 but that does not matter I guess) on a Windows 10 Professional 64 bit system. It can backup to a local drive (C:\users) and a network attached drive (SMB) without problems. 

The only problem is a leading &apos;/&apos; character in front of the drive code that appears when I select the directory using the &apos;Choose&apos; button right to the mount point, but manually removing this superfluous character solved the issue.

The &apos;Mount this directory before backing up&apos; checkbox must not be marked on Windows. I thought we removed that already but apparently not.

I am wondering what happens in case you execute the following command in a CMD shell window:

  cmd.exe /c copy /b /y xxx + nul E:\test.kmy

where you replace xxx with the absolute path (use \ as dir separator) to your data file. Does it make a difference if KMyMoney is running or not. On the above mentioned system this copies the file without problems.

Since you mention that it works on 4.8 I checked the code. 4.8 uses KIO::NetAccess::upload() to store the file, a functionality that is not available in KF5. That explains at least why it works on the older version.

Are you really using Windows CE?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917463</commentid>
    <comment_count>7</comment_count>
    <who name="">richardwcave</who>
    <bug_when>2020-03-22 14:25:34 +0000</bug_when>
    <thetext>Your diagnosis is correct on my system.
In v5 when I File/backup the KMymoney programme generates a file directory and after I choose the location of a folder to back up it to, KmyMoney records this as follows in the dialog box: -
/E:/Users/Rxxxxxxxxxx/...../KMyMoney/5.0 tests/Test backups

You will see at the beginning there is &apos;/&apos;, which prevents the backup file from being saved.
If I remove the &apos;/&apos; from the beginning of the absolute address the backup file is stored successfully.

I tested the command prompt
cmd.exe /c copy /b /y E:\Users\Rxxxx\Documents\....\Rxxxx.kmy + nul E:\test.kmy
This sucessfully copied the KMymoney file to E:\test.kmy regardless of whether or not I had KMymoney programme running.

To clarify I&apos;m using Windows 10 Pro 1909 installed 22/06/2019 OS build 18363.720

Based on the success of these tests I will revert back to KMymoney v5 and just remove the &apos;/&apos; before the backup folder location, until a fix comes along.

Thank you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917514</commentid>
    <comment_count>8</comment_count>
    <who name="Thomas Baumgart">thb</who>
    <bug_when>2020-03-22 18:28:01 +0000</bug_when>
    <thetext>Git commit c195e0cda57949891207f5c7f2c817d2b6fbe298 by Thomas Baumgart.
Committed on 22/03/2020 at 18:27.
Pushed by tbaumgart into branch &apos;5.0&apos;.

Improve handling of the backup feature on MS windows

On windows the option to mount a device is not available. So the GUI
elements have been removed in this case and the label is adjusted to be
more precise.

GUI:
FIXED-IN: 5.0.9

M  +10   -0    kmymoney/dialogs/kbackupdlg.cpp
M  +15   -35   kmymoney/dialogs/kbackupdlg.ui
M  +15   -3    kmymoney/kmymoney.cpp

https://commits.kde.org/kmymoney/c195e0cda57949891207f5c7f2c817d2b6fbe298</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917517</commentid>
    <comment_count>9</comment_count>
    <who name="Thomas Baumgart">tbaumgart</who>
    <bug_when>2020-03-22 18:34:12 +0000</bug_when>
    <thetext>I forgot to mention that a leading slash in front of a drive letter will be removed before it is used. So it may still be returned into the edit field but it does not cause trouble anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917523</commentid>
    <comment_count>10</comment_count>
    <who name="">richardwcave</who>
    <bug_when>2020-03-22 18:40:32 +0000</bug_when>
    <thetext>First class responses and thanks for the resolution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1917719</commentid>
    <comment_count>11</comment_count>
    <who name="Thomas Baumgart">tbaumgart</who>
    <bug_when>2020-03-23 17:21:46 +0000</bug_when>
    <thetext>*** Bug 418493 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1943405</commentid>
    <comment_count>12</comment_count>
    <who name="Thomas Baumgart">tbaumgart</who>
    <bug_when>2020-07-13 10:02:42 +0000</bug_when>
    <thetext>*** Bug 424143 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>