Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Sometimes dirtoparent is not defined. Parent.path() is though so it s…
…hould still be ok.
  • Loading branch information
Tom Ruggles committed May 29, 2015
commit a85825ed2cfc3756b2023d1db2608d597744b52e
7 changes: 6 additions & 1 deletion lib/tree_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ TreeEntry.prototype.getBlob = function(callback) {
* @return {String}
*/
TreeEntry.prototype.path = function(callback) {
return path.join(this.parent.path(), this.dirtoparent, this.filename());
console.log({
path: this.parent.path(),
dirtoparent: this.dirtoparent,
filename: this.filename()});
var dirtoparent = this.dirtoparent || "";
return path.join(this.parent.path(), dirtoparent, this.filename());
};

/**
Expand Down