<?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>407509</bug_id>
          
          <creation_ts>2019-05-13 20:08:57 +0000</creation_ts>
          <short_desc>&quot;File already exists&quot; dialog does not show up when you try to rename a file using the name of a file already present on desktop</short_desc>
          <delta_ts>2025-09-05 05:47:15 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Frameworks and Libraries</classification>
          <product>frameworks-kio</product>
          <component>general</component>
          <version>6.4.0</version>
          <rep_platform>Arch Linux</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>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Silva">bugseforuns</reporter>
          <assigned_to name="Pan Zhang">zhangpan</assigned_to>
          <cc>kde</cc>
    
    <cc>kdelibs-bugs-null</cc>
    
    <cc>med.medin.2014</cc>
    
    <cc>nate</cc>
    
    <cc>plasma-bugs-null</cc>
    
    <cc>yusq77</cc>
          
          <cf_commitlink>https://invent.kde.org/frameworks/kio/-/commit/e2869783a06c4a31a7f636b861f79bdffd8d79f8</cf_commitlink>
          <cf_versionfixedin>6.18</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1855982</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2019-05-13 20:08:57 +0000</bug_when>
    <thetext>STEPS TO REPRODUCE
1. set your desktop do folder view layout
2. copy two files of the same type to desktop
3. try to rename one of the two files using the same name as the other file that you copied to desktop

OBSERVED RESULT
plasma shows the error message &quot;Could not rename file...&quot;

EXPECTED RESULT
plasma shows the same &quot;File already exists&quot; dialog that appears when you follow the steps 2 and 3 using Dolphin

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.57.0
Qt Version: 5.13.0 beta3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1858254</commentid>
    <comment_count>1</comment_count>
    <who name="Kai Uwe Broulik">kde</who>
    <bug_when>2019-05-23 15:18:17 +0000</bug_when>
    <thetext>Dolphin uses KIO::moveAs which prompts to rename if already exists, whereas Folder View goes through KDirModel which uses KIO::rename which complains when it already exists and doesn&apos;t work when direct rename isn&apos;t possible.
I guess KDirModel should be changed?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2233406</commentid>
    <comment_count>2</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2023-05-27 13:15:37 +0000</bug_when>
    <thetext>*** Bug 470333 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2448202</commentid>
    <comment_count>3</comment_count>
    <who name="yushuoqi">yusq77</who>
    <bug_when>2025-08-18 08:14:00 +0000</bug_when>
    <thetext>@pan You can look at this question first.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2450677</commentid>
    <comment_count>4</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2025-08-27 02:14:40 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1981</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2450678</commentid>
    <comment_count>5</comment_count>
    <who name="Pan Zhang">zhangpan</who>
    <bug_when>2025-08-27 02:21:19 +0000</bug_when>
    <thetext>I have reproduced the issue and submitted a merge request.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2452667</commentid>
    <comment_count>6</comment_count>
    <who name="Akseli Lahtinen">akselmo</who>
    <bug_when>2025-09-05 05:47:15 +0000</bug_when>
    <thetext>Git commit e2869783a06c4a31a7f636b861f79bdffd8d79f8 by Akseli Lahtinen, on behalf of Pan Zhang.
Committed on 05/09/2025 at 05:32.
Pushed by akselmo into branch &apos;master&apos;.

KDirModel: use moveAs instead of Rename when editing file name
When renaming a file on the desktop to an existing filename, the operation previously failed with a generic error instead of showing the expected &quot;file already exists&quot; dialog. This change ensures consistent behavior with renaming in the file manager.
FIXED-IN: 6.18

M  +2    -1    src/widgets/kdirmodel.cpp

https://invent.kde.org/frameworks/kio/-/commit/e2869783a06c4a31a7f636b861f79bdffd8d79f8</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>