<?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>421792</bug_id>
          
          <creation_ts>2020-05-19 21:16:29 +0000</creation_ts>
          <short_desc>Save Incremental Version fails with specific file paths</short_desc>
          <delta_ts>2020-05-20 10:26:22 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>File formats</component>
          <version>git master (please specify the git hash!)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</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>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Anna Medonosova">anna.medonosova</reporter>
          <assigned_to name="Halla Rempt">halla</assigned_to>
          <cc>dimula73</cc>
    
    <cc>halla</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/commit/61d361583c764a0e1f55ff0268836253a985476b</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1931205</commentid>
    <comment_count>0</comment_count>
    <who name="Anna Medonosova">anna.medonosova</who>
    <bug_when>2020-05-19 21:16:29 +0000</bug_when>
    <thetext>SUMMARY
When a directory name resembles incremental version naming scheme, &apos;Save incremental version&apos; fails. The file path is parsed incorrectly - instead of the file name, Krita increments the number in the directory part of the path. Since such directory does not exist, saving fails.

The behavior is the same in git master, 4.3beta1 and 4.2.9.


STEPS TO REPRODUCE
1. Create a directory test_1.t
2. Create a document, save to test_1.t
3. Make a change
4. Save incremental version with File -&gt; &apos;Save Incremental Version&apos;

OBSERVED RESULT
&quot;Could not save [...]/test_2.t/test_increments.kra
Reason: Cannot open file for writing. Reason: The file could not be opened.&quot;

EXPECTED RESULT
The file name is correctly incremented and saved.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931300</commentid>
    <comment_count>1</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2020-05-20 10:26:16 +0000</bug_when>
    <thetext>Git commit ba632d486d6e700b837b3d8039916919e1ae5871 by Boudewijn Rempt.
Committed on 20/05/2020 at 10:25.
Pushed by rempt into branch &apos;krita/4.3&apos;.

Only regexp the filename, not the whole path for save incremental

And incremental backup, too.

M  +10   -8    libs/ui/KisViewManager.cpp

https://invent.kde.org/graphics/krita/commit/ba632d486d6e700b837b3d8039916919e1ae5871</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1931301</commentid>
    <comment_count>2</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2020-05-20 10:26:22 +0000</bug_when>
    <thetext>Git commit 61d361583c764a0e1f55ff0268836253a985476b by Boudewijn Rempt.
Committed on 20/05/2020 at 10:26.
Pushed by rempt into branch &apos;master&apos;.

Only regexp the filename, not the whole path for save incremental

And incremental backup, too.
(cherry picked from commit ba632d486d6e700b837b3d8039916919e1ae5871)

M  +10   -8    libs/ui/KisViewManager.cpp

https://invent.kde.org/graphics/krita/commit/61d361583c764a0e1f55ff0268836253a985476b</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>