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) {
},
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) cb && cb(err);
else 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