<?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>279926</bug_id>
          
          <creation_ts>2011-08-11 22:27:59 +0000</creation_ts>
          <short_desc>Ktorent breaks file hierarchy on file rename</short_desc>
          <delta_ts>2011-08-13 08:49:09 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>ktorrent</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>openSUSE</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>0</everconfirmed>
          <reporter name="Lastique">andysem</reporter>
          <assigned_to name="Joris Guisson">joris.guisson</assigned_to>
          
          
          <cf_commitlink></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>1152814</commentid>
    <comment_count>0</comment_count>
    <who name="Lastique">andysem</who>
    <bug_when>2011-08-11 22:27:59 +0000</bug_when>
    <thetext>Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

When opening a torrent for download, I can rename files and directories in the torrent so that they are stored on file system under different names. The problem is that if a file is renamed, it loses its position in the directory hierarchy as specified by torrent and placed at the top level directory where the torrent is being downloaded to.

Reproducible: Always

Steps to Reproduce:
1. Open a torrent for download. The torrent should have the following layout:

DirectoryA
  |
  |--&gt; DirectoryAA
  |      |
  |      |--&gt; FileAA1
  |      |--&gt; FileAA2
  |
  |--&gt; DirectoryAB
         |
         |--&gt; FileAB1
         |--&gt; FileAB2

2. Select the target directory to download the torrent to, say ~/Target.
3. In the open torrent window, select FileAA1 and press F2.
4. Rename the file to something else, say NewFileAA1.
5. Press OK to start downloading.


Actual Results:  
The resulting layout in ~/Target is as follows:

Target
  |
  |--&gt;DirectoryA
        |
        |--&gt; DirectoryAA
        |      |
        |      |--&gt; FileAA2
        |
        |--&gt; DirectoryAB
        |      |
        |      |--&gt; FileAB1
        |      |--&gt; FileAB2
        |
        |--&gt;NewFileAA1


Expected Results:  
The NewFileAA1 should be under DirectoryAA and not under DirectoryA.

OS: Linux (x86_64) release 3.0.0-8-desktop, OpenSUSE 11.4
Compiler: gcc
KTorrent: 4.1.1, KDE 4.7</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1153406</commentid>
    <comment_count>1</comment_count>
    <who name="Joris Guisson">joris.guisson</who>
    <bug_when>2011-08-13 08:48:06 +0000</bug_when>
    <thetext>Git commit d26acd018073607e0c7c810bd9390207006d21f1 by Joris Guisson.
Committed on 13/08/2011 at 10:46.
Pushed by guisson into branch &apos;master&apos;.

Fix file rename leading to file being placed in the toplevel directory

BUG: 279926

M  +1    -1    libktcore/torrent/torrentfiletreemodel.cpp
M  +1    -0    ChangeLog

http://commits.kde.org/ktorrent/d26acd018073607e0c7c810bd9390207006d21f1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1153407</commentid>
    <comment_count>2</comment_count>
    <who name="Joris Guisson">joris.guisson</who>
    <bug_when>2011-08-13 08:49:09 +0000</bug_when>
    <thetext>Git commit f5534b2a12c8984cbe78142e4f5b08af91915b47 by Joris Guisson.
Committed on 13/08/2011 at 10:46.
Pushed by guisson into branch &apos;4.1&apos;.

Backport to 4.1: Fix file rename leading to file being placed in the toplevel directory

CCBUG: 279926

M  +1    -1    libktcore/torrent/torrentfiletreemodel.cpp
M  +1    -0    ChangeLog

http://commits.kde.org/ktorrent/f5534b2a12c8984cbe78142e4f5b08af91915b47</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>