diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index da62b8b7f..4f7e75cbe 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -3348,24 +3348,24 @@ static void setLocation(void* vdata) } } - if (!err) + if (!err && do_move) { /* blow away the leftover subdirectories in the old location */ - if (do_move) - { - tr_torrentDeleteLocalData(tor, tr_sys_path_remove); - } - - /* set the new location and reverify */ - tr_torrentSetDownloadDir(tor, location); + tr_torrentDeleteLocalData(tor, tr_sys_path_remove); } } - if (!err && do_move) + if (!err) { - tr_free(tor->incompleteDir); - tor->incompleteDir = NULL; - tor->currentDir = tor->downloadDir; + /* set the new location and reverify */ + tr_torrentSetDownloadDir(tor, location); + + if (do_move) + { + tr_free(tor->incompleteDir); + tor->incompleteDir = NULL; + tor->currentDir = tor->downloadDir; + } } if (data->setme_state != NULL)