Bug 279926 - Ktorent breaks file hierarchy on file rename
Summary: Ktorent breaks file hierarchy on file rename
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE RPMs Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-11 22:27 UTC by Lastique
Modified: 2011-08-13 08:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lastique 2011-08-11 22:27:59 UTC
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
  |
  |--> DirectoryAA
  |      |
  |      |--> FileAA1
  |      |--> FileAA2
  |
  |--> DirectoryAB
         |
         |--> FileAB1
         |--> 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
  |
  |-->DirectoryA
        |
        |--> DirectoryAA
        |      |
        |      |--> FileAA2
        |
        |--> DirectoryAB
        |      |
        |      |--> FileAB1
        |      |--> FileAB2
        |
        |-->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
Comment 1 Joris Guisson 2011-08-13 08:48:06 UTC
Git commit d26acd018073607e0c7c810bd9390207006d21f1 by Joris Guisson.
Committed on 13/08/2011 at 10:46.
Pushed by guisson into branch 'master'.

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
Comment 2 Joris Guisson 2011-08-13 08:49:09 UTC
Git commit f5534b2a12c8984cbe78142e4f5b08af91915b47 by Joris Guisson.
Committed on 13/08/2011 at 10:46.
Pushed by guisson into branch '4.1'.

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