From a121cb6bafc9940cf6fa113711a7b9dabfe8a4d5 Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Sat, 12 Dec 2015 21:27:19 +1030 Subject: [PATCH] don't use output directory if part of input directory. Fixes #911 --- TorrentToMedia.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TorrentToMedia.py b/TorrentToMedia.py index 0f453b39..accb9998 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -117,6 +117,9 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID, outputDestination = outputDestination.encode(core.SYS_ENCODING) except: pass + if outputDestination in inputDirectory: + outputDestination = inputDirectory + logger.info("Output directory set to: %s" % (outputDestination)) if core.SAFE_MODE and outputDestination == core.TORRENT_DEFAULTDIR: