diff --git a/lua/cold_word_drop/processor.lua b/lua/cold_word_drop/processor.lua index b8787d5..d3c2936 100644 --- a/lua/cold_word_drop/processor.lua +++ b/lua/cold_word_drop/processor.lua @@ -14,6 +14,11 @@ local tbls = { local function get_record_filername(record_type) + local user_distribute_name = rime_api:get_distribution_name() + if user_distribute_name == '小狼毫' then + return string.format("%%APPDATA%%\\Rime\\lua\\cold_word_record\\%s_words.lua", record_type) + end + local system = io.popen("uname -s"):read("*l") local filename = nil -- body @@ -21,8 +26,6 @@ local function get_record_filername(record_type) filename = string.format("%s/Library/Rime/lua/cold_word_drop/%s_words.lua", os.getenv('HOME'), record_type) elseif system == "Linux" then filename = string.format("%s/.config/ibus/rime/lua/cold_word_drop/%s_words.lua", os.getenv('HOME'), record_type) - else - filename = string.format("%%APPDATA%%\\Rime\\lua\\cold_word_drop\\%s_words.lua", record_type) end return filename end @@ -143,4 +146,4 @@ local function processor(key, env) return 2 -- kNoop, 不做任何操作, 交给下个组件处理 end -return processor \ No newline at end of file +return processor