pull/614/head
Louis Vézina 5 years ago
parent 63d5037566
commit d65601d9cb

@ -866,6 +866,8 @@ def save_subtitles(file_path, subtitles, single=False, directory=None, chmod=Non
logger.debug(u"Saving %r to %r", subtitle, subtitle_path) logger.debug(u"Saving %r to %r", subtitle, subtitle_path)
content = subtitle.get_modified_content(format=format, debug=debug_mods) content = subtitle.get_modified_content(format=format, debug=debug_mods)
if content: if content:
if os.path.exists(subtitle_path):
os.remove(subtitle_path)
with open(subtitle_path, 'w') as f: with open(subtitle_path, 'w') as f:
f.write(content) f.write(content)
subtitle.storage_path = subtitle_path subtitle.storage_path = subtitle_path

Loading…
Cancel
Save