Added chmod execution (if required) after manually triggered tools execution. #1478

pull/1492/head
morpheus65535 3 years ago
parent 96b8b5ccce
commit aca99415b8

@ -1,5 +1,7 @@
# coding=utf-8
import sys
import os
import ast
from datetime import timedelta
from dateutil import rrule
@ -1977,6 +1979,12 @@ class Subtitles(Resource):
else:
subtitles_apply_mods(language, subtitles_path, [action])
# apply chmod if required
chmod = int(settings.general.chmod, 8) if not sys.platform.startswith(
'win') and settings.general.getboolean('chmod_enabled') else None
if chmod:
os.chmod(subtitles_path, chmod)
return '', 204

Loading…
Cancel
Save