Skip to content

Commit d581d5d

Browse files
committed
Merge pull request neocotic#20 from NetOxygen/close-fd-on-success-in-writeFileSync
writeFileSync: close the fd on success.
2 parents 3079c5a + 7157fc4 commit d581d5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qr.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@
268268

269269
try {
270270
fs.writeSync(fd, buff, 0, buff.length, 0);
271-
} catch (error) {
271+
} finally {
272272
fs.closeSync(fd);
273273
}
274274
}

0 commit comments

Comments
 (0)