File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -96,10 +96,16 @@ function M.posix_to_windows(posix_path)
96
96
-- vim.notify("Only '/[A-Za-z]' case: " .. posix_path, vim.log.levels.WARN)
97
97
posix_path = posix_path :gsub (" ^/([A-Za-z])" , " %1:\\ " )
98
98
prefix_changed = true
99
- else
99
+ elseif posix_path : find ( " /[A-Za-z]:?/ " ) then
100
100
-- vim.notify("'/[A-Za-z]:?/' case: " .. posix_path, vim.log.levels.WARN)
101
101
posix_path = posix_path :gsub (" ^/([A-Za-z]):?/" , " %1:\\ " )
102
102
prefix_changed = true
103
+ else
104
+ -- The code path can be taken only in specific cases
105
+ -- like a custom folder under msys2 root (/abc).
106
+ -- vim.notify("General mapping case for given path: " .. posix_path, vim.log.levels.WARN)
107
+ posix_path = posix_path :gsub (" ^/" , M .msys2_root .. " \\ " )
108
+ prefix_changed = true
103
109
end
104
110
end
105
111
@@ -123,6 +129,8 @@ function M.posix_to_windows(posix_path)
123
129
end
124
130
125
131
132
+ -- vim.notify("posix_to_windows will return " .. posix_path, vim.log.levels.WARN)
133
+
126
134
return posix_path
127
135
end
128
136
You can’t perform that action at this time.
0 commit comments