Merge pull request #43 from claflamme/directory-separator
Changed directory separators to use path.sep instead of '/'.
This commit is contained in:
commit
06ccf5d52e
|
@ -7,6 +7,7 @@
|
|||
function noop() {}
|
||||
|
||||
var fs = require('fs'),
|
||||
path = require('path'),
|
||||
EventEmitter = require('events').EventEmitter,
|
||||
TypeEmitter = require('./node-type-emitter');
|
||||
|
||||
|
@ -35,7 +36,7 @@
|
|||
emitter.emit('names', curpath, files, noop);
|
||||
files.forEachAsync(function (cont, file) {
|
||||
emitter.emit('name', curpath, file, noop);
|
||||
fs.lstat(curpath + '/' + file, function (err, stat) {
|
||||
fs.lstat(curpath + path.sep + file, function (err, stat) {
|
||||
stat = stat || {};
|
||||
stat.name = file;
|
||||
if (err) {
|
||||
|
@ -79,7 +80,7 @@
|
|||
}
|
||||
|
||||
function fullPath(v,i,o) {
|
||||
o[i]= [curpath, '/', v].join('');
|
||||
o[i]= [curpath, path.sep, v].join('');
|
||||
}
|
||||
|
||||
curpath = pathname;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
, EventEmitter = require('events').EventEmitter
|
||||
, TypeEmitter = require('./node-type-emitter')
|
||||
, util = require('util')
|
||||
, path = require('path')
|
||||
;
|
||||
|
||||
function appendToDirs(stat) {
|
||||
|
@ -95,7 +96,7 @@
|
|||
me._wCurFileCallback = cont;
|
||||
me.emit('name', me._wcurpath, file, noop);
|
||||
|
||||
statPath = me._wcurpath + '/' + file;
|
||||
statPath = me._wcurpath + path.sep + file;
|
||||
|
||||
if (!me._wsync) {
|
||||
// TODO how to remove this anony?
|
||||
|
@ -256,7 +257,7 @@
|
|||
var me = this
|
||||
;
|
||||
|
||||
o[i] = [me._wcurpath, '/', v].join('');
|
||||
o[i] = [me._wcurpath, path.sep, v].join('');
|
||||
};
|
||||
Walker.prototype.pause = function () {
|
||||
this._paused = true;
|
||||
|
|
Loading…
Reference in New Issue