From e62e38d66c6eb447bbd8f16b5beec0fe0276ea0d Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 21 Oct 2014 19:31:29 +0100 Subject: [PATCH] Add warning when serving a non-existent wiki folder The warning will be yellow to make it noticeable --- core/modules/commands/server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/modules/commands/server.js b/core/modules/commands/server.js index edbb1f1ca..9daab1b13 100644 --- a/core/modules/commands/server.js +++ b/core/modules/commands/server.js @@ -17,7 +17,7 @@ if(!$tw.browser) { fs = require("fs"), url = require("url"), path = require("path"), - http = require("http"); + http = require("http"); } exports.info = { @@ -278,6 +278,9 @@ var Command = function(params,commander,callback) { }; Command.prototype.execute = function() { + if(!$tw.boot.wikiTiddlersPath) { + $tw.utils.warning("Warning: Wiki folder '" + $tw.boot.wikiPath + "' does not exist"); + } var port = this.params[0] || "8080", rootTiddler = this.params[1] || "$:/core/save/all", renderType = this.params[2] || "text/plain",