-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix getDestFilePath behavior for directories #52
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -210,7 +210,26 @@ Filter.prototype.canProcessFile = | |
return !!this.getDestFilePath(relativePath); | ||
}; | ||
|
||
Filter.prototype.isDirectory = function(relativePath) { | ||
if (this.inputPaths === undefined) { | ||
return false; | ||
} | ||
|
||
var srcDir = this.inputPaths[0]; | ||
var path = srcDir + '/' + relativePath; | ||
|
||
return fs.lstatSync(path).isDirectory(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rather then stating again, lets pass |
||
}; | ||
|
||
Filter.prototype.getDestFilePath = function(relativePath) { | ||
// NOTE: relativePath may have been moved or unlinked | ||
try { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. with the above suggestion, i suspect this is no longer required. |
||
if (this.isDirectory(relativePath)) { | ||
return null; | ||
} | ||
} catch(e) { | ||
} | ||
|
||
if (this.extensions == null) { | ||
return relativePath; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when is this true?