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

fix(rmdir): close dir in case of error

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