Skip to content
Browse files

Use fs.pathSeparator instead of a hard-coded character.

  • Loading branch information...
1 parent 0a0f4bc commit 8b81cf83190877cac0cd357a8d92131ec6381b37 Ariya Hidayat committed Apr 13, 2011
Showing with 2 additions and 2 deletions.
  1. +1 −1 examples/lint.js
  2. +1 −1 examples/scandir.js
View
2 examples/lint.js
@@ -5742,7 +5742,7 @@ var scanDirectory = function (path) {
entries.push(path);
} else if (fs.isDirectory(path)) {
fs.list(path).forEach(function (e) {
- subdirs = scanDirectory(path + '/' + e);
+ subdirs = scanDirectory(path + fs.pathSeparator + e);
subdirs.forEach(function (s) {
entries.push(s);
});
View
2 examples/scandir.js
@@ -7,7 +7,7 @@ var scanDirectory = function (path) {
system.print(path);
} else if (fs.isDirectory(path)) {
fs.list(path).forEach(function (e) {
- scanDirectory(path + '/' + e);
+ scanDirectory(path + fs.pathSeparator + e);
});
}
};

0 comments on commit 8b81cf8

Please sign in to comment.
Something went wrong with that request. Please try again.