Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#702 closed bug (Fixed)

renamed folers rollback to it original name

Reported by: axet Owned by: andar
Priority: major Milestone:
Component: Unknown Version: 1.1.8
Keywords: Cc:

Description

try to rename folder, then restart deluge

Attachments (2)

torrent.torrent (166.6 KB ) - added by axet 16 years ago.
example torrent with root folder
7436273c4e53c5daf7621060617838a6902cd4f3.torrent (90.3 KB ) - added by axet 16 years ago.
torrent file example

Download all attachments as: .zip

Change History (16)

by axet, 16 years ago

Attachment: torrent.torrent added

example torrent with root folder

comment:1 by axet, 16 years ago

sometimes renaming do half-renaming, sometimes renaming do rollback after restart.

here is example torrent.

  1. add torrent as paused state
  2. go to files tab, rename root folder
  3. refresh screen (click to any other torrent, and go back)
  4. you can see two folders with old name and new name in files tab
  5. after restart you can see old name\half old half new names\ new names

tested for 1.1.0

comment:2 by axet, 16 years ago

Version: 1.1.0_RC31.1.0

each deluge restart you lose one renamed torrent

comment:3 by axet, 16 years ago

it should be easy to solve. i have run simple test:

  1. run deluge with one torrent
  2. check state/ folder
  3. rename folder, and quit deluge
  4. and check state/ folder again.

here is output:

[axet@axet-laptop state]$ ll
total 112
-rw-rw-r-- 1 axet axet 10394 2009-01-19 00:24 7436273c4e53c5daf7621060617838a6902cd4f3.fastresume
-rw-rw-r-- 1 axet axet 92487 2009-01-18 21:20 7436273c4e53c5daf7621060617838a6902cd4f3.torrent
-rw-rw-r-- 1 axet axet   909 2009-01-19 18:50 torrents.state
[axet@axet-laptop state]$ ll
total 112
-rw-rw-r-- 1 axet axet 10394 2009-01-19 00:24 7436273c4e53c5daf7621060617838a6902cd4f3.fastresume
-rw-rw-r-- 1 axet axet 92487 2009-01-18 21:20 7436273c4e53c5daf7621060617838a6902cd4f3.torrent
-rw-rw-r-- 1 axet axet   909 2009-01-25 17:18 torrents.state
[axet@axet-laptop state]$

as you can see state is not changed! look like as simple .save option miss.

comment:4 by axet, 16 years ago

i check this situation in deluge and libtorrent sources. and found two places:

one is in libtorrent library, it called torrent resume data. you can found code in two functions torrent::read_resume_data/torrent::write_resume_data

library call special field in resume data structure as "mapped_files", which help libtorrent to rename and restore new file names from real file names from original .torrent file.

second place is in deluge, torrent.py make a native call to libtorrent library from def rename_folder / rename_files.

i think deluge forgot to call save resume state.

can anyone confirm this bug, and its location?

comment:5 by andar, 16 years ago

Resolution: fixed
Status: newclosed

comment:6 by anonymous, 16 years ago

which release?

comment:7 by anonymous, 16 years ago

Resolution: fixed
Status: closedreopened

still persist in 1.1.3

comment:8 by anonymous, 16 years ago

Version: 1.1.01.1.4

persist in 1.1.4

did you mark it as fixed just for fun?

comment:9 by civmaniac@gmail.com, 16 years ago

Version: 1.1.41.1.7

Issue is still in 1.1.7 Renaming is unusable.

by axet, 16 years ago

torrent file example

comment:11 by axet, 16 years ago

Version: 1.1.71.1.8

comment:12 by andar, 16 years ago

Resolution: fixed
Status: reopenedclosed

There have been some recent fixes to libtorrent regarding renaming files and I suspect this would fix the issue you are experiencing. You can test this by using the 1.1.0_RC branch from svn, using libtorrent's RC_0_14 branch from svn or waiting for libtorrent 0.14.5 to be released.

comment:13 by anonymous, 16 years ago

does it work for you?

comment:14 by anonymous, 16 years ago

andar please do not close not solved bugreports

Note: See TracTickets for help on using tickets.