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

Glob sync: trailing slash fix #159

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleanup
  • Loading branch information
meyer committed Feb 6, 2015
commit 07c5552747d963841c28742a25481081c020c316
8 changes: 1 addition & 7 deletions sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,7 @@ GlobSync.prototype._processSimple = function (prefix, index) {
if (!this.matches[index])
this.matches[index] = Object.create(null)

// If it doesn't exist or isn't a file or dir, then just
// mark the lack of results
// If it doesn't exist, then just mark the lack of results
if (!prefixStat)
return

Expand Down Expand Up @@ -377,14 +376,9 @@ GlobSync.prototype._stat = function (f) {
if (Array.isArray(c))
c = 'DIR'

// It exists, but not how we need it
if (abs.slice(-1) === '/' && c !== 'DIR')
return false

return c
}

var exists
var stat = this.statCache[abs]
if (!stat) {
try {
Expand Down