Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Support Windows-style paths #1

Merged
merged 1 commit into from

2 participants

@errcw

Similar to node-commondir, I encountered some trouble getting browserify to work on Windows, and patched this in the process. Unfortunately no tests for this change because path.resolve only works on Windows in node >= 0.5.X and I'm not willing to break the tests for 0.4.X.

@substack substack merged commit 638951e into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 18, 2011
  1. @errcw
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  index.js
View
2  index.js
@@ -25,7 +25,7 @@ exports.sync = function (x, opts) {
|| path.dirname(require.cache[__filename].parent.filename)
;
- if (x.match(/^(?:\.\.?\/|\/)/)) {
+ if (x.match(/^(?:\.\.?\/|\/|([A-Za-z]:)?\\)/)) {
var m = loadAsFileSync(path.resolve(y, x))
|| loadAsDirectorySync(path.resolve(y, x));
if (m) return m;
Something went wrong with that request. Please try again.