Comments (14)
Please note that there's also some debug messages being printed:
JOIN 5 / /Users/xxx/Work/test
JOIN 6 / /Users/xxx/Work/test
JOIN 0 / /Users/xxx/Work/test
JOIN 1 / /Users/xxx/Work/test
from node-glob.
Debug messages are fixed by #55
from node-glob.
Hm, I can't seem to reproduce.
c:\globtest\node-glob>node g.js
c:\globtest\node-glob\ [ 'c:/globtest/node-glob/' ]
c:\globtest\node-glob [ 'c:/globtest/node-glob/' ]
c:\globtest\node-glob>cd test
c:\globtest\node-glob\test>node ../g.js
c:\globtest\node-glob\ [ 'c:/globtest/node-glob/' ]
c:\globtest\node-glob [ 'c:/globtest/node-glob/' ]
c:\globtest\node-glob\test>cp ../g.js ./g.js
c:\globtest\node-glob\test>node g.js
c:\globtest\node-glob\test\ [ 'c:/globtest/node-glob/test/' ]
c:\globtest\node-glob\test [ 'c:/globtest/node-glob/test/' ]
c:\globtest\node-glob\test>cd ..
c:\globtest\node-glob>cd ..
c:\globtest>cd ..
c:\>node c:\globtest\node-glob\test\g.js
c:\globtest\node-glob\test\ [ 'c:/globtest/node-glob/test/' ]
c:\globtest\node-glob\test [ 'c:/globtest/node-glob/test/' ]
c:\>z:
Z:\>node c:\globtest\node-glob\test\g.js
c:\globtest\node-glob\test\ [ 'c:/globtest/node-glob/test/' ]
c:\globtest\node-glob\test [ 'c:/globtest/node-glob/test/' ]
Is it possible that you were using a different version of glob or something?
from node-glob.
Hmm not really but I will try it again later with my windows machine (I switched to MacOSX few weeks ago).
from node-glob.
Any chance to try to repro this?
from node-glob.
Still reproducible.
Running:
var glob = require('glob');
glob(__dirname + '\\', { mark: true }, function (err, matches) {
console.log(matches); // Contains the __dirname without the \ or / added to the end
});
Outputs:
C:\Work\test>node -v
v0.10.4
C:\Work\test>node test
[ 'C:/Work/test' ]
C:\Work\test>
Fresh installed windows 7 x64 (virtual machine).
from node-glob.
@isaacs can you reopen the issue?
from node-glob.
Actually, this seems to work for me.
// t.js
var glob = require('glob');
var assert = require('assert');
glob(__dirname + '\\', { mark: true }, function (err, matches) {
// Should contain the dirname with / on the end
console.log(matches);
console.log("glob version %s", require('glob/package.json').version);
console.log("node version %s", process.version);
assert.equal(matches[0], __dirname.replace(/\\+/g, '/') + '/');
console.log('ok');
});
C:\globtest\x>C:\node-v0.10.12\Release\node.exe t.js
[ 'C:/globtest/x/' ]
glob version 3.1.14
node version v0.10.12
ok
Are you sure you're using the latest version of glob?
from node-glob.
Note, a "fresh install of windows" doesn't matter if you're using an old install of node and glob. Do npm ls glob
to see which version you're using, and npm install glob@latest
to make sure to install the latest one.
from node-glob.
I still have the same issue..
C:\test>node -v
v0.10.12
C:\test>node test.js
[ 'C:/test' ]
Using [email protected]
.
Are you emulating windows by any chance?
from node-glob.
Ha! I was the one using an outdated glob! Apparently this was fixed in 3.1.14, but regressed in 3.2.
C:\globtest\x>C:\node-v0.10.12\Release\node.exe t.js
[ 'C:/globtest/x' ]
glob version 3.2.1
node version v0.10.12
assert.js:92
throw new assert.AssertionError({
^
AssertionError: "C:/globtest/x" == "C:/globtest/x/"
at C:\globtest\x\t.js:9:12
at Glob.<anonymous> (C:\globtest\node_modules\glob\glob.js:90:7)
at Glob.EventEmitter.emit (events.js:95:17)
at Glob._processEmitQueue (C:\globtest\node_modules\glob\glob.js:294:10)
at Glob.emitMatch (C:\globtest\node_modules\glob\glob.js:271:10)
at Glob._finish (C:\globtest\node_modules\glob\glob.js:232:8)
at Glob.<anonymous> (C:\globtest\node_modules\glob\glob.js:173:27)
at Glob.cb (C:\globtest\node_modules\glob\glob.js:315:11)
at Glob.<anonymous> (C:\globtest\node_modules\glob\glob.js:355:16)
at Glob._afterStat (C:\globtest\node_modules\glob\glob.js:561:6)
from node-glob.
Yes, I'm emulating windows 7 in VMWare. I don't have a "real" bare-metal windows machine.
from node-glob.
That's fine, I'm using that too.
from node-glob.
Fixed on latest release. Issue was that path.resolve()
removes trailing slashes.
from node-glob.
Related Issues (20)
- Compile error with 10.3.8 HOT 3
- Typescript: Cannot find type declarations HOT 2
- Cannot find module 'glob' or its corresponding type declarations HOT 1
- add a flag like `--ignore-path` similar to Prettier HOT 1
- New version jackspeak break commonjs libs HOT 6
- Are there return value examples for versions 7.1.6 and 10 glob.sync HOT 4
- Recent bump of `jackspeak` dep should have been a major version bump HOT 8
- Patch update 10.3.6 -> 10.3.7 appears to have multiple breaking changes HOT 3
- Redundant `//?/` HOT 4
- Clarify nocase documentation (specifically when setting it to not match OS behavior) HOT 2
- ignore option is not working with relative path HOT 1
- Using path.join no results HOT 1
- CWE-772 on dependency inflight HOT 1
- Memory leak in inflight dependency HOT 4
- Using vulnerable package inflight HOT 1
- `glob.sync(...)` is not returning values when `".."` and `nocase: true` are used together. HOT 2
- results are in reverse alphabetical order HOT 5
- npm i glob
- npm i glob
- `follow: true` doesn't follow more that 1 symbolic link HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-glob.