From 9183beeed4d9a4960fb973a2c35abba5bff12b86 Mon Sep 17 00:00:00 2001 From: supertobi Date: Wed, 27 Feb 2019 09:57:36 +0100 Subject: [PATCH 1/3] video_ffmpeg add df.sanitize_filename() I'm not 100% sure, but I think we need the df.sanitize_filename() here. --- contrib/video_ffmpeg.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/video_ffmpeg.lua b/contrib/video_ffmpeg.lua index d561d55..af797e5 100644 --- a/contrib/video_ffmpeg.lua +++ b/contrib/video_ffmpeg.lua @@ -441,7 +441,7 @@ local function finalize_export(storage, images_table, extra_data) else dt.print(_("SUCCESS")) if extra_data["open_after_export"] then - dsys.launch_default_app(path) + dsys.launch_default_app(df.sanitize_filename(path)) end end From 24862a26f23fe18e971283f60f8e0e23e7a1b16b Mon Sep 17 00:00:00 2001 From: supertobi Date: Thu, 28 Feb 2019 11:41:56 +0100 Subject: [PATCH 2/3] 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( From 287d9e94cf791fe2e81ca7e8807e53ebaaca5de5 Mon Sep 17 00:00:00 2001 From: supertobi Date: Thu, 28 Feb 2019 13:22:10 +0100 Subject: [PATCH 3/3] video_ffmpeg I forgot the argument --- contrib/video_ffmpeg.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/video_ffmpeg.lua b/contrib/video_ffmpeg.lua index 4fbce4a..6755e5c 100644 --- a/contrib/video_ffmpeg.lua +++ b/contrib/video_ffmpeg.lua @@ -424,7 +424,7 @@ local function finalize_export(storage, images_table, extra_data) dt.print(_("prepare merge process")) - local result = df.mkdir(df.sanitize_filename()) + local result = df.mkdir(df.sanitize_filename(tmp_dir)) if result ~= 0 then dt.print(_("ERROR: cannot create temp directory")) end local images = extra_data["images"]