From 24862a26f23fe18e971283f60f8e0e23e7a1b16b Mon Sep 17 00:00:00 2001 From: supertobi Date: Thu, 28 Feb 2019 11:41:56 +0100 Subject: [PATCH] viedeo_ffmpeg df.sanitize_filename() viedeo_ffmpeg df.sanitize_filename() for mkdir and rmdir --- contrib/video_ffmpeg.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/video_ffmpeg.lua b/contrib/video_ffmpeg.lua index af797e5..4fbce4a 100644 --- a/contrib/video_ffmpeg.lua +++ b/contrib/video_ffmpeg.lua @@ -412,7 +412,7 @@ local function export(extra_data) local img_ext = extra_data["img_ext"] local output_file = extra_data["output_file"] - local dir_create_result = df.mkdir(df.get_path(output_file)) + local dir_create_result = df.mkdir(df.sanitize_filename(df.get_path(output_file))) if dir_create_result ~= 0 then return dir_create_result end local cmd = ffmpeg_path.." -y -r "..fps.." -i "..dir..PS.."%d"..img_ext.." -s:v "..res.." -c:v "..codec.." -crf 18 -preset veryslow "..df.sanitize_filename(output_file) @@ -424,7 +424,7 @@ local function finalize_export(storage, images_table, extra_data) dt.print(_("prepare merge process")) - local result = df.mkdir(tmp_dir) + local result = df.mkdir(df.sanitize_filename()) if result ~= 0 then dt.print(_("ERROR: cannot create temp directory")) end local images = extra_data["images"] @@ -445,7 +445,7 @@ local function finalize_export(storage, images_table, extra_data) end end - df.rmdir(tmp_dir) + df.rmdir(df.sanitize_filename(tmp_dir)) end dt.register_storage(