diff options
author | garret <garret@airmail.cc> | 2021-08-11 16:41:36 +0100 |
---|---|---|
committer | garret <garret@airmail.cc> | 2021-08-11 16:41:36 +0100 |
commit | dd4adb78d8c8553ea99cf5ef4dcaf2e1a39d5552 (patch) | |
tree | 31edb100355edaced0bf80ec45f057d47c074654 /audio-clipper.lua | |
parent | 10fb2f1eedcfdb333bb206809780286804fe82da (diff) | |
download | aegisub-scripts-dd4adb78d8c8553ea99cf5ef4dcaf2e1a39d5552.tar.gz aegisub-scripts-dd4adb78d8c8553ea99cf5ef4dcaf2e1a39d5552.tar.bz2 aegisub-scripts-dd4adb78d8c8553ea99cf5ef4dcaf2e1a39d5552.zip |
use lfs
as opposed to os.execute(mkdir) lol
Diffstat (limited to 'audio-clipper.lua')
-rw-r--r-- | audio-clipper.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/audio-clipper.lua b/audio-clipper.lua index 228bfc4..645feb4 100644 --- a/audio-clipper.lua +++ b/audio-clipper.lua @@ -52,12 +52,13 @@ function get_format(copy, format, custom) end function make_out_path(out_path) + local lfs = require "aegisub.lfs" if out_path == "" then err("Need an output path!") end - os.execute('mkdir "'..out_path..'"') -- if it doesn't exist, it makes it, and if it does, it errors. - return out_path -- either way, the path now exists. (probably) -end -- I imagine there's a mkdir thing in lua that's better, but this works fine, so unless it breaks, i'll keep it like this. + lfs.mkdir(out_path) + return out_path +end function extract_audio(in_path, start_time, end_time, out_path, name, extension, copy) if copy == true then |