mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +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;
|
PtrArrayCompareFunc vstrcmp = (PtrArrayCompareFunc)strcmp;
|
||||||
const char * const top = tor->currentDir;
|
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 it's a magnet link, there's nothing to move... */
|
||||||
if (!tr_torrentHasMetadata (tor))
|
if (!tr_torrentHasMetadata (tor))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue