From 46154e730929aa4c1ad2e54afd383a66de2bfc3e Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Fri, 16 Sep 2011 23:08:35 +0000 Subject: [PATCH] (trunk libT) add a magnet link check to deleteLocalData(). Thanks to plaes for reporting this issue. --- libtransmission/torrent.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index 2c1c83c0e..34de633bf 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -2748,6 +2748,10 @@ deleteLocalData( tr_torrent * tor, tr_fileFunc func ) const void * const vstrcmp = strcmp; const char * const top = tor->currentDir; + /* if it's a magnet link, there's nothing to move... */ + if( !tr_torrentHasMetadata( tor ) ) + return; + /*** **** Move the local data to a new tmpdir ***/