From 4cbd1b36fba9ac8d75fd7b7e909345e2e8c2759c Mon Sep 17 00:00:00 2001 From: echel0n Date: Sun, 13 Apr 2014 13:05:18 -0700 Subject: [PATCH] Changed how it detects windows for removing read-only flags --- TorrentToMedia.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TorrentToMedia.py b/TorrentToMedia.py index ed8b88dd..7983dbd5 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -6,6 +6,7 @@ import re import shutil import sys import nzbtomedia +import platform from subprocess import Popen from nzbtomedia.autoProcess.autoProcessComics import autoProcessComics @@ -149,7 +150,7 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID) if not inputCategory in nzbtomedia.NOFLATTEN: #don't flatten hp in case multi cd albums, and we need to copy this back later. flatten(outputDestination) - if os.name == 'nt': # remove Read Only flag from files in Windows. + if platform.system().lower() == 'windows': # remove Read Only flag from files in Windows. remove_read_only(outputDestination) # Now check if video files exist in destination: