Skip to content

Commit

Permalink
Merge pull request #14 from gforceg/master
Browse files Browse the repository at this point in the history
replace '/' literals with path.sep
  • Loading branch information
beefsack authored Mar 17, 2017
2 parents b85ae4c + 9cb82f2 commit 10907c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hound.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Hound.prototype.watch = function(src) {
if (stats.isDirectory()) {
var files = fs.readdirSync(src)
for (var i = 0, len = files.length; i < len; i++) {
self.watch(src + '/' + files[i])
self.watch(src + path.sep + files[i])
}
}
self.watchers[src] = watchFn(src, function(event, filename) {
Expand All @@ -64,7 +64,7 @@ Hound.prototype.watch = function(src) {
// Check files to see if there are any new files
var dirFiles = fs.readdirSync(src)
for (var i = 0, len = dirFiles.length; i < len; i++) {
var file = src + '/' + dirFiles[i]
var file = src + path.sep + dirFiles[i]
if (self.watchers[file] === undefined) {
self.watch(file)
self.emit('create', file, fs.statSync(file))
Expand Down

0 comments on commit 10907c7

Please sign in to comment.