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) { ...@@ -32,12 +32,12 @@ module.exports = function rmdir(path, cb) {
}, },
connection, connection,
function(err, files) { function(err, files) {
if (err) cb && cb(err); SMB2Request('close', file, connection, function() {
// SMB2 close directory if (err) {
else return cb(err);
SMB2Request('close', file, connection, function() { }
cb && cb(null, files); 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