File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -14,21 +14,9 @@ local M = {
14
14
}
15
15
16
16
local function ensure_directory_exists (path )
17
- local dir_path = path
18
- local cmd
19
-
20
- if dir_path and vim .fn .isdirectory (dir_path ) == 0 then
21
- if vim .fn .has (" win32" ) > 0 then
22
- cmd = ' cmd /c "mkdir "' .. dir_path :gsub (" \\ " , " \\\\ " ):gsub (" /" , " \\\\ " )
23
- else
24
- cmd = " mkdir " .. vim .fn .shellescape (dir_path )
25
- end
26
-
27
- logger .trace (" Creating directory with command: " .. cmd )
28
- vim .fn .system (cmd )
29
-
30
- if vim .v .shell_error ~= 0 then
31
- logger .error (" Failed to create directory: " .. dir_path )
17
+ if path and vim .fn .isdirectory (path ) == 0 then
18
+ if vim .fn .mkdir (path ) == 0 then
19
+ logger .error (" failed to create directory: " .. path )
32
20
return false
33
21
end
34
22
end
You can’t perform that action at this time.
0 commit comments