From 53b3d6be351907d2461f6a17d41932f24a7d8a61 Mon Sep 17 00:00:00 2001 From: Abe Fettig Date: Wed, 19 Aug 2009 12:56:06 +0200 Subject: [PATCH] Bugfix: stdin fd (0) being ignored by node.File. In the case of stdin options.fd is 0, which is considered false, therefore fd gets set to null intead of 0. http://groups.google.com/group/nodejs/msg/80849f6aa0b0eaa0 --- src/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file.js b/src/file.js index 05a8496ead..1c61ddecce 100644 --- a/src/file.js +++ b/src/file.js @@ -52,7 +52,7 @@ node.fs.File = function (options) { self.encoding = node.RAW; } //node.debug("encoding: opts=" + options.encoding + " self=" + self.encoding); - self.fd = options.fd || null; + self.fd = typeof options.fd != 'undefined' ? options.fd : null; var actionQueue = [];