From d04124b9984109b123dc427b2e516f958a5529dd Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Tue, 17 Jul 2007 09:00:04 +0000 Subject: [PATCH] fix disk_io move_storage --- libtorrent/src/disk_io_thread.cpp | 9 +-------- src/core.py | 5 +++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/libtorrent/src/disk_io_thread.cpp b/libtorrent/src/disk_io_thread.cpp index 34a83d6c2..b02ab0012 100644 --- a/libtorrent/src/disk_io_thread.cpp +++ b/libtorrent/src/disk_io_thread.cpp @@ -216,14 +216,7 @@ namespace libtorrent break; case disk_io_job::move_storage: ret = j.storage->move_storage_impl(j.str) ? 1 : 0; - if(ret) - { - j.str = "move_success"; - } - else - { - j.str = "move_failed"; - } + j.str = j.storage->save_path().string(); break; case disk_io_job::release_files: j.storage->release_files_impl(); diff --git a/src/core.py b/src/core.py index 6973069b9..23d255a2c 100644 --- a/src/core.py +++ b/src/core.py @@ -565,10 +565,11 @@ class Manager: callback(event) if event['event_type'] is self.constants['EVENT_STORAGE_MOVED']: - if event['message'] == "move_failed": + if event['message'] == self.unique_IDs[event['unique_ID']].save_dir: raise StorageMoveFailed(_("You cannot move torrent to a different partition. Please fix your preferences")) - elif event['message'] == "move_success": + elif event['message'] == self.get_pref('default_finished_path'): self.unique_IDs[event['unique_ID']].save_dir = self.get_pref('default_finished_path') + elif event['event_type'] is self.constants['EVENT_FINISHED']: # Queue seeding torrent to bottom if needed if self.get_pref('enable_move_completed'):