mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
Change torrent location even if no data move is needed
This helps when old and new location point to the same place but the actual path differs (i.e. one of the paths is a symlink). Fixes: #35
This commit is contained in:
parent
7e6f1a8dc8
commit
8c88e8bba0
1 changed files with 12 additions and 12 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue