mirror of
https://github.com/transmission/transmission
synced 2024-12-25 09:13:06 +00:00
fix infinite loop in deleteLocalData().
This commit is contained in:
parent
0d49daf36d
commit
ed12ddb090
1 changed files with 4 additions and 0 deletions
|
@ -2887,6 +2887,10 @@ deleteLocalData (tr_torrent * tor, tr_fileFunc func)
|
|||
PtrArrayCompareFunc vstrcmp = (PtrArrayCompareFunc)strcmp;
|
||||
const char * const top = tor->currentDir;
|
||||
|
||||
/* don't try to delete local data if the directory's gone missing */
|
||||
if (!tr_sys_path_exists (top, NULL))
|
||||
return;
|
||||
|
||||
/* if it's a magnet link, there's nothing to move... */
|
||||
if (!tr_torrentHasMetadata (tor))
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue