Permalink
Browse files

Add node v0.2.3 support

  • Loading branch information...
1 parent 01f3e79 commit 10d75d5f5e5e4d6464e6cf1d9eab82ff35e1775c @creationix committed May 5, 2011
Showing with 10 additions and 2 deletions.
  1. +1 −1 indexer.js
  2. +1 −1 package.json
  3. +8 −0 static.js
View
@@ -3,7 +3,7 @@ var Fs = require('fs'),
Url = require('url'),
getMime = require('simple-mime')("application/octet-stream");
-var ENOENT = require('constants').ENOENT;
+var ENOENT = process.ENOENT || require('constants').ENOENT;
module.exports = function setup(mount, root, showHidden) {
View
@@ -2,7 +2,7 @@
"name": "creationix",
"description": "Creationix is a meta package for my personal packages",
"tags": ["stack", "creationix", "meta", "sandbox"],
- "version": "0.1.1",
+ "version": "0.1.2",
"author": "Tim Caswell <tim@creationix.com>",
"repository": {
"type": "git",
View
@@ -86,6 +86,14 @@ module.exports = function setup(mount, root, index) {
res.writeHead(code, headers);
return res.end();
}
+ if (process.ENOENT) {
+ Fs.readFile(path, function (err, data) {
+ if (err) { return next(err); }
+ res.writeHead(code, headers);
+ res.end(data);
+ });
+ return;
+ }
var stream = Fs.createReadStream(path, {start: start, end: end});
stream.once('data', function (chunk) {
res.writeHead(code, headers);

0 comments on commit 10d75d5

Please sign in to comment.