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