Updated files

This commit is contained in:
Bill Ferguson
2019-02-21 23:49:52 -05:00
parent d9ce826b9d
commit 8f6a236eb6
2 changed files with 12 additions and 11 deletions

View File

@@ -34,11 +34,12 @@ This script has been tested under Linux only
]]
local dt = require "darktable"
local du = require "lib/dtutils"
local df = require "lib/dtutils.file"
local dsys = require "lib/dtutils.system"
local gettext = dt.gettext
dt.configuration.check_version(...,{5,0,0})
du.check_min_api_version("5.0.0")
local MODULE_NAME = "video_ffmpeg"
@@ -444,7 +445,7 @@ local function finalize_export(storage, images_table, extra_data)
end
end
df.rm(tmp_dir)
df.rmdir(tmp_dir)
end
dt.register_storage(

View File

@@ -582,15 +582,15 @@ function dtutils_file.mkdir(path)
end
end
dtutils_file.libdoc.functions["rm"] = {
dtutils_file.libdoc.functions["rmdir"] = {
Name = [[rm]],
Synopsis = [[remove file or directory]],
Synopsis = [[recursively remove a directory]],
Usage = [[local df = require "lib/dtutils.file"
df.rm(path)
path - string - a file or directory path]],
Description = [[rm allow to recursively remove files or directories]],
Return_Value = [[path - string - a file or directory path]],
df.rmdir(path)
path - string - a directory path]],
Description = [[rmdir recursively removes directories and any files contained within]],
Return_Value = [[path - string - a directory path]],
Limitations = [[]],
Example = [[]],
See_Also = [[]],
@@ -598,9 +598,9 @@ dtutils_file.libdoc.functions["rm"] = {
License = [[]],
Copyright = [[]],
}
function dtutils_file.rm(path)
local rm_cmd = dt.configuration.running_os == "windows" and "rmdir /S /Q" or "rm -r"
return dsys.external_command(rm_cmd.." "..dtutils_file.sanitize_filename(path))
function dtutils_file.rmdir(path)
local rmdir_cmd = dt.configuration.running_os == "windows" and "rmdir /S /Q" or "rm -r"
return dsys.external_command(rmdir_cmd.." "..dtutils_file.sanitize_filename(path))
end