Skip to content

Commit d6dc8cf

Browse files
authored
fix: UpdateRemotePlugins not finding specs on Windows #565
Specs were being found with a normalized path, but being requested without normalization. We now normalize the path we responding to spec requests. fixes #564
1 parent 9f3e010 commit d6dc8cf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pynvim/plugin/host.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import logging
77
import os
88
import os.path
9+
import pathlib
910
import re
1011
import sys
1112
from functools import partial
@@ -173,7 +174,7 @@ def _load(self, plugins: Sequence[str]) -> None:
173174
# self.nvim.err_write("host init _load\n", async_=True)
174175
has_script = False
175176
for path in plugins:
176-
path = os.path.normpath(path) # normalize path
177+
path = pathlib.Path(os.path.normpath(path)).as_posix() # normalize path
177178
err = None
178179
if path in self._loaded:
179180
warn('{} is already loaded'.format(path))
@@ -276,6 +277,7 @@ def _copy_attributes(self, fn, fn2):
276277

277278
def _on_specs_request(self, path):
278279
path = decode_if_bytes(path)
280+
path = pathlib.Path(os.path.normpath(path)).as_posix() # normalize path
279281
if path in self._load_errors:
280282
self.nvim.out_write(self._load_errors[path] + '\n')
281283
return self._specs.get(path, 0)

0 commit comments

Comments
 (0)