Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

Commit ddaca6b

Browse files
committed
Merge pull request #60 from pazdera/clean-dirstat
Clean dirStat when uploading directories
2 parents 21608ce + ee4ef60 commit ddaca6b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/client.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,10 @@ Client.prototype.upload = function(src, dest, callback) {
264264
// Get the attributes of the source directory
265265
fs.stat(path.dirname(src), function(err, dirStat) {
266266
if(err) return callback(err);
267-
self.mkdir(path.dirname(dest), dirStat, function(err){ callback(err, stat) });
267+
268+
var cleanDirStat = {mode: dirStat.mode};
269+
270+
self.mkdir(path.dirname(dest), cleanDirStat, function(err){ callback(err, stat) });
268271
});
269272
},
270273
function(stat, callback) {

0 commit comments

Comments
 (0)