Updated files
This commit is contained in:
@@ -34,11 +34,12 @@ This script has been tested under Linux only
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
local dt = require "darktable"
|
local dt = require "darktable"
|
||||||
|
local du = require "lib/dtutils"
|
||||||
local df = require "lib/dtutils.file"
|
local df = require "lib/dtutils.file"
|
||||||
local dsys = require "lib/dtutils.system"
|
local dsys = require "lib/dtutils.system"
|
||||||
local gettext = dt.gettext
|
local gettext = dt.gettext
|
||||||
|
|
||||||
dt.configuration.check_version(...,{5,0,0})
|
du.check_min_api_version("5.0.0")
|
||||||
|
|
||||||
local MODULE_NAME = "video_ffmpeg"
|
local MODULE_NAME = "video_ffmpeg"
|
||||||
|
|
||||||
@@ -444,7 +445,7 @@ local function finalize_export(storage, images_table, extra_data)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
df.rm(tmp_dir)
|
df.rmdir(tmp_dir)
|
||||||
end
|
end
|
||||||
|
|
||||||
dt.register_storage(
|
dt.register_storage(
|
||||||
|
|||||||
@@ -582,15 +582,15 @@ function dtutils_file.mkdir(path)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
dtutils_file.libdoc.functions["rm"] = {
|
dtutils_file.libdoc.functions["rmdir"] = {
|
||||||
Name = [[rm]],
|
Name = [[rm]],
|
||||||
Synopsis = [[remove file or directory]],
|
Synopsis = [[recursively remove a directory]],
|
||||||
Usage = [[local df = require "lib/dtutils.file"
|
Usage = [[local df = require "lib/dtutils.file"
|
||||||
|
|
||||||
df.rm(path)
|
df.rmdir(path)
|
||||||
path - string - a file or directory path]],
|
path - string - a directory path]],
|
||||||
Description = [[rm allow to recursively remove files or directories]],
|
Description = [[rmdir recursively removes directories and any files contained within]],
|
||||||
Return_Value = [[path - string - a file or directory path]],
|
Return_Value = [[path - string - a directory path]],
|
||||||
Limitations = [[]],
|
Limitations = [[]],
|
||||||
Example = [[]],
|
Example = [[]],
|
||||||
See_Also = [[]],
|
See_Also = [[]],
|
||||||
@@ -598,9 +598,9 @@ dtutils_file.libdoc.functions["rm"] = {
|
|||||||
License = [[]],
|
License = [[]],
|
||||||
Copyright = [[]],
|
Copyright = [[]],
|
||||||
}
|
}
|
||||||
function dtutils_file.rm(path)
|
function dtutils_file.rmdir(path)
|
||||||
local rm_cmd = dt.configuration.running_os == "windows" and "rmdir /S /Q" or "rm -r"
|
local rmdir_cmd = dt.configuration.running_os == "windows" and "rmdir /S /Q" or "rm -r"
|
||||||
return dsys.external_command(rm_cmd.." "..dtutils_file.sanitize_filename(path))
|
return dsys.external_command(rmdir_cmd.." "..dtutils_file.sanitize_filename(path))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user