Changed how it detects windows for removing read-only flags

This commit is contained in:
echel0n 2014-04-13 13:05:18 -07:00
parent 9bd7eb4ec7
commit 4cbd1b36fb

View file

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