Commit ddee7317 authored by Julien Fontanet's avatar Julien Fontanet

fix(rename): close dir/file in case of error

parent 2c20499b
......@@ -53,12 +53,10 @@ function rename_(connection, file, newPath, options, cb) {
},
connection,
function(err) {
if (err) cb && cb(err);
// SMB2 close file
else
SMB2Request('close', file, connection, function() {
cb && cb(null);
});
SMB2Request('close', file, connection, function() {
if (err) cb && cb(err);
else cb && cb(null);
});
}
);
}
......
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