From 3a1621c8443eb58f1f965de63c4e25a0d634e382 Mon Sep 17 00:00:00 2001 From: Ren Tatsumoto Date: Thu, 7 Dec 2023 01:01:05 +0300 Subject: [PATCH] be separator-agnostic when constructing config path related to #25 --- videoclip.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/videoclip.lua b/videoclip.lua index 59a3507..7a48781 100644 --- a/videoclip.lua +++ b/videoclip.lua @@ -631,8 +631,8 @@ function pref_menu:save() video_codec = true, audio_codec = true, } - local mpv_dirpath = string.gsub(mp.get_script_directory(), "scripts/%w+", "") - local config_filepath = utils.join_path(mpv_dirpath, string.format('script-opts/%s.conf', NAME)) + local mpv_dirpath = string.gsub(mp.get_script_directory(), "scripts[\\/]%w+", "") + local config_filepath = utils.join_path(utils.join_path(mpv_dirpath, "script-opts"), string.format('%s.conf', NAME)) local handle = io.open(config_filepath, 'w') if handle ~= nil then handle:write(string.format("# Written by %s on %s.\n", NAME, os.date()))