Skip to content

Commit

Permalink
Revert "Sort readdir results"
Browse files Browse the repository at this point in the history
This reverts commit bbaa547.

Rationale:
#143 (comment)
  • Loading branch information
isaacs committed Jan 13, 2015
1 parent 8d56824 commit 718cf36
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 68 deletions.
3 changes: 2 additions & 1 deletion glob.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ var assert = require('assert')
var globSync = require('./sync.js')
var common = require('./common.js')
var alphasort = common.alphasort
var alphasorti = common.alphasorti
var isAbsolute = common.isAbsolute
var setopts = common.setopts
var ownProp = common.ownProp
Expand Down Expand Up @@ -449,7 +450,7 @@ function readdirCb (self, abs, cb) {
if (er)
self._readdirError(abs, er, cb)
else
self._readdirEntries(abs, entries.sort(alphasort), cb)
self._readdirEntries(abs, entries, cb)
}
}

Expand Down
3 changes: 2 additions & 1 deletion sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ var path = require('path')
var assert = require('assert')
var common = require('./common.js')
var alphasort = common.alphasort
var alphasorti = common.alphasorti
var isAbsolute = common.isAbsolute
var setopts = common.setopts
var ownProp = common.ownProp
Expand Down Expand Up @@ -235,7 +236,7 @@ GlobSync.prototype._readdir = function (abs, inGlobStar) {
}

try {
return this._readdirEntries(abs, fs.readdirSync(abs).sort(alphasort))
return this._readdirEntries(abs, fs.readdirSync(abs))
} catch (er) {
this._readdirError(abs, er)
return null
Expand Down
1 change: 0 additions & 1 deletion test/bash-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
"./test/nocase-nomagic.js",
"./test/nodir.js",
"./test/pause-resume.js",
"./test/readdir-order.js",
"./test/readme-issue.js",
"./test/root-nomount.js",
"./test/root.js",
Expand Down
65 changes: 0 additions & 65 deletions test/readdir-order.js

This file was deleted.

0 comments on commit 718cf36

Please sign in to comment.