1
0
Fork 0
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:
Jordan Lee 2014-11-10 01:39:14 +00:00
parent 0d49daf36d
commit ed12ddb090

View file

@ -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;