Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rg_derive_root on Windows #3

Open
fraxen opened this issue Nov 3, 2016 · 2 comments
Open

rg_derive_root on Windows #3

fraxen opened this issue Nov 3, 2016 · 2 comments

Comments

@fraxen
Copy link

fraxen commented Nov 3, 2016

There is a problem with the derivation of RgRootDir() in Windows.

In RgMakePath - the top (root) directory is drive:/, e.g. c:/. I did a dirty little fix and changed RgMakePath to:

fun! s:RgMakePath(dirs, dir)
  let l:root = has("win32") ? '' : '/'
  return l:root.join(a:dirs[0:index(a:dirs, a:dir)], '/')
endfun

...but this doesn't work for UNC paths, e.g. //computer/share/folder, so there is room for a better solution.

@jremmen
Copy link
Owner

jremmen commented Nov 20, 2016

Thanks, I'll look into it when I get some time.

@n00bmind
Copy link

n00bmind commented Apr 4, 2019

Same issue here.. @fraxen solution worked as long as I have 'shellslash' set. Otherwise we need to account for the slashes in RgRootDir() too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants