Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fucking Windows.

  • Loading branch information...
commit 752e24627da286a988e0f9af4d8056bbcfc57bdd 1 parent 1da8f2e
@mde mde authored
View
4 lib/cluster/master.js
@@ -104,7 +104,9 @@ Master.prototype = new (function () {
fs.renameSync(currentLog, archivedLog);
}
catch(e) {
- fileUtils.cpR(currentLog, archivedLog);
+ // cpR doesn't work correctly on Windows either, just blow
+ // away the fucking log
+ //fileUtils.cpR(currentLog, archivedLog);
fs.unlinkSync(currentLog);
}
}
View
2  lib/template/adapters/ejs/ejs.js
@@ -131,7 +131,7 @@ ejs.TemplateNode.prototype = new function () {
var cached = ejs.textCache[this.url];
// Use cached template text if possible
- if (geddy.config.environment == 'production' && cached) {
+ if (geddy.config.environment != 'development' && cached) {
handleLoaded(cached);
}
// If this is the first hit, use the template text off disc
View
10 lib/template/adapters/ejs/index.js
@@ -16,7 +16,8 @@
*
*/
-var errors = require('../../../errors')
+var path = require('path')
+ , errors = require('../../../errors')
, TemplaterBase = require('../../templater_base').TemplaterBase
, EventEmitter = require('events').EventEmitter
, TemplateNode = require('./template_node').TemplateNode;
@@ -94,9 +95,9 @@ var getTemplateUrl = function (templateRoot, partialUrl, parentNode, isLayout) {
dirs.push(parentNode.dirname);
}
// Also look in the specified templateRoot
- dirs.push(templateRoot);
+ dirs.push(path.normalize(templateRoot));
// Also look in the base views dir
- dirs.push('app/views');
+ dirs.push(path.normalize('app/views'));
// Look through the directory list until you find a registered
// template path -- these are registered during app init so we're
@@ -104,6 +105,7 @@ var getTemplateUrl = function (templateRoot, partialUrl, parentNode, isLayout) {
for (var i = 0, ii = dirs.length; i < ii; i++) {
dir = dirs[i];
key = dir + '/' + partialUrl + '.html.ejs';
+ key = path.normalize(key);
if (geddy.templateRegistry[key]) {
templateUrl = key;
break;
@@ -114,7 +116,7 @@ var getTemplateUrl = function (templateRoot, partialUrl, parentNode, isLayout) {
if (!templateUrl) {
// If it's a layout, use the default one for the app
if (isLayout) {
- templateUrl = 'app/views/layouts/application.html.ejs';
+ templateUrl = path.normalize('app/views/layouts/application.html.ejs');
}
// Bail out if a normal content template
else {
Please sign in to comment.
Something went wrong with that request. Please try again.