fix disk_io move_storage
This commit is contained in:
parent
2ef85f46db
commit
d04124b998
|
@ -216,14 +216,7 @@ namespace libtorrent
|
||||||
break;
|
break;
|
||||||
case disk_io_job::move_storage:
|
case disk_io_job::move_storage:
|
||||||
ret = j.storage->move_storage_impl(j.str) ? 1 : 0;
|
ret = j.storage->move_storage_impl(j.str) ? 1 : 0;
|
||||||
if(ret)
|
j.str = j.storage->save_path().string();
|
||||||
{
|
|
||||||
j.str = "move_success";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
j.str = "move_failed";
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case disk_io_job::release_files:
|
case disk_io_job::release_files:
|
||||||
j.storage->release_files_impl();
|
j.storage->release_files_impl();
|
||||||
|
|
|
@ -565,10 +565,11 @@ class Manager:
|
||||||
callback(event)
|
callback(event)
|
||||||
|
|
||||||
if event['event_type'] is self.constants['EVENT_STORAGE_MOVED']:
|
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"))
|
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')
|
self.unique_IDs[event['unique_ID']].save_dir = self.get_pref('default_finished_path')
|
||||||
|
|
||||||
elif event['event_type'] is self.constants['EVENT_FINISHED']:
|
elif event['event_type'] is self.constants['EVENT_FINISHED']:
|
||||||
# Queue seeding torrent to bottom if needed
|
# Queue seeding torrent to bottom if needed
|
||||||
if self.get_pref('enable_move_completed'):
|
if self.get_pref('enable_move_completed'):
|
||||||
|
|
Loading…
Reference in New Issue