add debugging to track down #894

This commit is contained in:
clinton-hall 2015-12-18 23:57:07 +10:30
commit fd5ee775e0
2 changed files with 3 additions and 0 deletions

View file

@ -250,8 +250,10 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
# remove torrent # remove torrent
if core.USELINK == 'move-sym' and not core.DELETE_ORIGINAL == 1: if core.USELINK == 'move-sym' and not core.DELETE_ORIGINAL == 1:
logger.debug('Checking for sym-links to re-direct in: %s' % (inputDirectory))
for dirpath, dirs, files in os.walk(inputDirectory): for dirpath, dirs, files in os.walk(inputDirectory):
for file in files: for file in files:
logger.debug('Checking symlink: %s' % (os.path.join(dirpath,file)))
core.replace_links(os.path.join(dirpath,file)) core.replace_links(os.path.join(dirpath,file))
core.remove_torrent(clientAgent, inputHash, inputID, inputName) core.remove_torrent(clientAgent, inputHash, inputID, inputName)

View file

@ -253,6 +253,7 @@ def copy_link(src, targetLink, useLink):
def replace_links(link): def replace_links(link):
if not os.path.islink(link): if not os.path.islink(link):
logger.debug('%s is not a link' % (link))
return return
target = link target = link
n = 0 n = 0