Commit 3cb82be6 authored by Julien Fontanet's avatar Julien Fontanet

fix(rmdir): close dir in case of error

parent a2a550a9
......@@ -32,12 +32,12 @@ module.exports = function rmdir(path, cb) {
},
connection,
function(err, files) {
if (err) cb && cb(err);
// SMB2 close directory
else
SMB2Request('close', file, connection, function() {
cb && cb(null, files);
});
SMB2Request('close', file, connection, function() {
if (err) {
return cb(err);
}
cb(null, files);
});
}
);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment