Commit fd21ee2d authored by Julien Fontanet's avatar Julien Fontanet

fix(unlink): close file in case of error

parent ddee7317
...@@ -32,12 +32,10 @@ module.exports = function unlink(path, cb) { ...@@ -32,12 +32,10 @@ module.exports = function unlink(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) cb && cb(err);
else else cb && cb(null, files);
SMB2Request('close', file, connection, function() { });
cb && 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