diff options
author | anekos | 2010-04-12 17:34:00 +0000 |
---|---|---|
committer | anekos | 2010-04-12 17:34:00 +0000 |
commit | 81da597f0c189a7311c2c4422e0950e5d8a85d2a (patch) | |
tree | 9b287dbee8362eb987db83e7bc06b521d9a40f6a | |
parent | b8ca1a329a11740938c13e08e5051f0867caf544 (diff) | |
download | vimperator-plugins-81da597f0c189a7311c2c4422e0950e5d8a85d2a.tar.bz2 |
expandPath 時に ../ のようなものを正規化
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@37205 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r-- | auto_source.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/auto_source.js b/auto_source.js index 7079777..5ffb25f 100644 --- a/auto_source.js +++ b/auto_source.js @@ -121,12 +121,16 @@ let INFO = (files = files.filter(function (it) (!(it.path.indexOf(filepath) === 0 && func(it)+'-')))); function expandPath (filepath) { + function normalize (filepath) + let (file = io.File(filepath)) + (file.normalize(), file.path); + filepath = io.expandPath(filepath); if (filepath.match(/\/|\w:[\\\/]/)) - return filepath; + return normalize(filepath); let cur = io.getCurrentDirectory(); cur.appendRelativePath(filepath); - return cur.path; + return normalize(cur.path); } function startWatching (filepath, command, force, initHelp) { |