sjbach/lusty — pull request #58 by jdelkins (2011-12-12 08:45:32+00:00)
Title: Fix several quoting issues, especially on Windows

Most important issue: navigating to `C:\Users\joel` was translated by the quoting code to `\\Users\\joel`, which, looking like a UNC path, would fail. Solution is to use Vim's built in `fnameescape` function to handle path quoting rather than a ruby function with `gsub`s.

Another issue is that in some cases on Windows, `readable?` may succeed but the directory may not actually be readable, apparently due to how the permission system works on that OS. This was worked around with a `rescue` block.

Finally, there appears to be some issues with navigating to directories with single quotes in the directory name. this seems to fix those.

I tested these patches on Linux and Windows 7, in both cases with Ruby 1.8.7. I did not include the rebuilt plugin/* files in the patches for brevity.