Skip to content

Commit fd7cff3

Browse files
dundargocdmitmel
authored andcommitted
fix(windows): stdpath("state") => "nvim-data" neovim#18546
This was missed in neovim#15583
1 parent dd6e497 commit fd7cff3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/nvim/os/stdpaths.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ char *get_xdg_home(const XDGVarType idx)
103103
if (dir) {
104104
#if defined(WIN32)
105105
dir = concat_fnames_realloc(dir,
106-
(idx == kXDGDataHome ? "nvim-data" : "nvim"),
106+
((idx == kXDGDataHome
107+
|| idx == kXDGStateHome) ? "nvim-data" : "nvim"),
107108
true);
108109
#else
109110
dir = concat_fnames_realloc(dir, "nvim", true);

test/functional/options/defaults_spec.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ describe('startup defaults', function()
206206

207207
describe('$NVIM_LOG_FILE', function()
208208
local xdgdir = 'Xtest-startup-xdg-logpath'
209-
local xdgstatedir = xdgdir..'/nvim'
209+
local xdgstatedir = iswin() and xdgdir..'/nvim-data' or xdgdir..'/nvim'
210210
after_each(function()
211211
os.remove('Xtest-logpath')
212212
rmdir(xdgdir)

0 commit comments

Comments
 (0)