added option to remove read only flags in windows. fixes #317

This commit is contained in:
clinton-hall 2014-04-11 17:05:07 +09:30
commit b63ff3c962
2 changed files with 13 additions and 2 deletions

View file

@ -158,6 +158,9 @@ def main(inputDirectory, inputName, inputCategory, inputHash, inputID):
if not inputCategory in 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.
remove_read_only(outputDestination)
# Now check if video files exist in destination:
if config().issubsection(inputCategory,["SickBeard","NzbDrone","CouchPotato"]):
for dirpath, dirnames, filenames in os.walk(outputDestination):