diff --git a/bin/installDeps.sh b/bin/installDeps.sh index 9763f41b..fc3133c1 100755 --- a/bin/installDeps.sh +++ b/bin/installDeps.sh @@ -44,8 +44,8 @@ fi #check node version NODE_VERSION=$(node --version) NODE_V_MINOR=$(echo $NODE_VERSION | cut -d "." -f 1-2) -if [ ! $NODE_V_MINOR = "v0.8" ] && [ ! $NODE_V_MINOR = "v0.6" ]; then - echo "You're running a wrong version of node, you're using $NODE_VERSION, we need v0.6.x or v0.8.x" >&2 +if [ ! $NODE_V_MINOR = "v0.8" ] && [ ! $NODE_V_MINOR = "v0.6" ] && [ ! $NODE_V_MINOR = "v0.10" ]; then + echo "You're running a wrong version of node, you're using $NODE_VERSION, we need v0.6.x, v0.8.x or v0.10.x" >&2 exit 1 fi diff --git a/bin/installOnWindows.bat b/bin/installOnWindows.bat index f678672b..f7452982 100644 --- a/bin/installOnWindows.bat +++ b/bin/installOnWindows.bat @@ -8,7 +8,7 @@ cmd /C node -e "" || ( echo "Please install node.js ( http://nodejs.org )" && ex echo _ echo Checking node version... -set check_version="if(['6','8'].indexOf(process.version.split('.')[1].toString()) === -1) { console.log('You are running a wrong version of Node. Etherpad Lite requires v0.6.x or v0.8.x'); process.exit(1) }" +set check_version="if(['6','8','10'].indexOf(process.version.split('.')[1].toString()) === -1) { console.log('You are running a wrong version of Node. Etherpad Lite requires v0.6.x, v0.8.x or v0.10.x'); process.exit(1) }" cmd /C node -e %check_version% || exit /B 1 echo _ diff --git a/src/node/db/SessionStore.js b/src/node/db/SessionStore.js index 09ea7333..52a504f1 100644 --- a/src/node/db/SessionStore.js +++ b/src/node/db/SessionStore.js @@ -22,7 +22,7 @@ SessionStore.prototype.get = function(sid, fn){ { if (sess) { sess.cookie.expires = 'string' == typeof sess.cookie.expires ? new Date(sess.cookie.expires) : sess.cookie.expires; - if (!sess.cookie.expires || new Date() < expires) { + if (!sess.cookie.expires || new Date() < sess.cookie.expires) { fn(null, sess); } else { self.destroy(sid, fn); diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index a6c71a85..72053ad3 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -142,7 +142,7 @@ exports.abiwordAvailable = function() exports.reloadSettings = function reloadSettings() { // Discover where the settings file lives var settingsFilename = argv.settings || "settings.json"; - settingsFilename = path.resolve(path.join(root, settingsFilename)); + settingsFilename = path.resolve(path.join(exports.root, settingsFilename)); var settingsStr; try{ diff --git a/src/node/utils/caching_middleware.js b/src/node/utils/caching_middleware.js index 1d103ffd..d30dc398 100644 --- a/src/node/utils/caching_middleware.js +++ b/src/node/utils/caching_middleware.js @@ -168,7 +168,7 @@ CachingMiddleware.prototype = new function () { } else if (req.method == 'GET') { var readStream = fs.createReadStream(pathStr); res.writeHead(statusCode, headers); - util.pump(readStream, res); + readStream.pipe(res); } else { res.writeHead(statusCode, headers); res.end(); diff --git a/src/package.json b/src/package.json index 24f15ca9..2366daf3 100644 --- a/src/package.json +++ b/src/package.json @@ -16,7 +16,7 @@ "require-kernel" : "1.0.5", "resolve" : "0.2.x", "socket.io" : "0.9.x", - "ueberDB" : "0.1.96", + "ueberDB" : "0.2.x", "async" : "0.1.x", "express" : "3.x", "connect" : "2.4.x",