Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Fix #55 missing 2 chars in root folder
Browse files Browse the repository at this point in the history
  • Loading branch information
alisinabh committed Jan 21, 2017
1 parent 539f2f1 commit d9abcbe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/utils/find_files.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ FindFiles.prototype.search = function() {
// remove source path prefix
if (self.path !== './') {
files = files.map( function(filename) {
return filename.substr(self.path.length);
if (filename.startsWith(self.path)) {
return filename.substr(self.path.length);
} else {
return filename;
}
});
}
}
Expand Down

0 comments on commit d9abcbe

Please sign in to comment.