Skip to content

Commit

Permalink
fix(windows): stdpath("state") => "nvim-data" neovim#18546
Browse files Browse the repository at this point in the history
This was missed in neovim#15583
  • Loading branch information
dundargoc authored and kraftwerk28 committed Jun 1, 2022
1 parent 16075f7 commit daaf909
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/nvim/os/stdpaths.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ char *get_xdg_home(const XDGVarType idx)
if (dir) {
#if defined(WIN32)
dir = concat_fnames_realloc(dir,
(idx == kXDGDataHome ? "nvim-data" : "nvim"),
((idx == kXDGDataHome
|| idx == kXDGStateHome) ? "nvim-data" : "nvim"),
true);
#else
dir = concat_fnames_realloc(dir, "nvim", true);
Expand Down
2 changes: 1 addition & 1 deletion test/functional/options/defaults_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ describe('startup defaults', function()

describe('$NVIM_LOG_FILE', function()
local xdgdir = 'Xtest-startup-xdg-logpath'
local xdgstatedir = xdgdir..'/nvim'
local xdgstatedir = iswin() and xdgdir..'/nvim-data' or xdgdir..'/nvim'
after_each(function()
os.remove('Xtest-logpath')
rmdir(xdgdir)
Expand Down

0 comments on commit daaf909

Please sign in to comment.