projects
/
platform
/
upstream
/
nodejs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5be730
)
Close fd on readFile(emptyfile)
author
Ryan Dahl
<ry@tinyclouds.org>
Tue, 10 Aug 2010 21:47:40 +0000
(14:47 -0700)
committer
Ryan Dahl
<ry@tinyclouds.org>
Tue, 10 Aug 2010 21:47:40 +0000
(14:47 -0700)
lib/fs.js
patch
|
blob
|
history
diff --git
a/lib/fs.js
b/lib/fs.js
index
5fb1950
..
6fc0e5f
100644
(file)
--- a/
lib/fs.js
+++ b/
lib/fs.js
@@
-55,6
+55,7
@@
fs.readFile = function (path, encoding_, callback) {
var offset = 0;
function doRead() {
if (size < 1) {
+ binding.close(fd);
callback(null, buffer);
return;
}