]> git.gir.st - VimFx.git/commit
Fix `__dirname` in config files on Windows
authorSimon Lydell <simon.lydell@gmail.com>
Mon, 11 Apr 2016 06:59:10 +0000 (08:59 +0200)
committerSimon Lydell <simon.lydell@gmail.com>
Mon, 11 Apr 2016 06:59:10 +0000 (08:59 +0200)
commit0cfa280b57a168aefc22fa0f07fb332640c7f7a9
treea758ef483f223d0bead13f44d6a9a4831d9edf42
parent2cac92c1389b30f96b8b0b0017804c509a0a11be
Fix `__dirname` in config files on Windows

`OS.Path.dirname` does not seem to support `file://` URIs on Windows.
`OS.Path.dirname('file:///C:/Users/foo/.vimfx/config.js')` returns `'file:'`.

This commit calculates the dirname in a different way to work around the above
problem.

Thanks to @azuwis for finding out and suggesting a fix.

Supersedes and closes #719.
extension/lib/config.coffee
Imprint / Impressum