Skip to content

Conversation

@WindyValley
Copy link

Probably for consistency with vim.fn.stdpath, core.helper.path_join uses '' as the path separator on Windows. However, even on Windows, the path returned by vim.fs.find still uses /. This caused pack:load_modules_packages to error when extracting the module name from the module path. To avoid compatibility issues with other places where core.helper.path_join is used, only preprocess modules_path with vim.fs.normalize in pack:load_modules_packages.

…Windows Probably for consistency with `vim.fn.stdpath`, `core.helper.path_join` uses '\' as the path separator on Windows. However, even on Windows, the path returned by `vim.fs.find` still uses `/`. This caused `pack:load_modules_packages` to error when extracting the module name from the module path. To avoid compatibility issues with other places where `core.helper.path_join` is used, only preprocess modules_path with `vim.fs.normalize` in `pack:load_modules_packages`.
@WindyValley
Copy link
Author

WindyValley commented Sep 7, 2023

另外,有两个地方看符号名似乎用反了

function helper.data_path()
local cli = require('core.cli')
if cli.config_path then
return cli.config_path
end
return vim.fn.stdpath('data')
end

dope/lua/core/helper.lua

Lines 16 to 22 in d7ed25a

function helper.config_path()
local cli = require('core.cli')
if cli.data_path then
return cli.data_path
end
return vim.fn.stdpath('config')
end

我没用dope脚本,不太确定会有什么后果

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant