Skip to content

Commit 69b9a1f

Browse files
authored
Merge pull request #173 from darktable-org/supertobi-patch-video_ffmpeg
video_ffmpeg add df.sanitize_filename()
2 parents a319428 + 287d9e9 commit 69b9a1f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contrib/video_ffmpeg.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ local function export(extra_data)
412412
local img_ext = extra_data["img_ext"]
413413
local output_file = extra_data["output_file"]
414414

415-
local dir_create_result = df.mkdir(df.get_path(output_file))
415+
local dir_create_result = df.mkdir(df.sanitize_filename(df.get_path(output_file)))
416416
if dir_create_result ~= 0 then return dir_create_result end
417417

418418
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)
424424

425425
dt.print(_("prepare merge process"))
426426

427-
local result = df.mkdir(tmp_dir)
427+
local result = df.mkdir(df.sanitize_filename(tmp_dir))
428428
if result ~= 0 then dt.print(_("ERROR: cannot create temp directory")) end
429429

430430
local images = extra_data["images"]
@@ -441,11 +441,11 @@ local function finalize_export(storage, images_table, extra_data)
441441
else
442442
dt.print(_("SUCCESS"))
443443
if extra_data["open_after_export"] then
444-
dsys.launch_default_app(path)
444+
dsys.launch_default_app(df.sanitize_filename(path))
445445
end
446446
end
447447

448-
df.rmdir(tmp_dir)
448+
df.rmdir(df.sanitize_filename(tmp_dir))
449449
end
450450

451451
dt.register_storage(

0 commit comments

Comments
 (0)