From b71438e89de79f985d8c904fef757083aae14758 Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Wed, 27 Sep 2017 15:33:29 +0200
Subject: prosody, prosodyctl: Print the actual config file name used when a
 problem loading it was encountered (see #990)

---
 prosody | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'prosody')

diff --git a/prosody b/prosody
index da204214..635ec5f3 100755
--- a/prosody
+++ b/prosody
@@ -95,7 +95,7 @@ function read_config()
 		print("\n");
 		print("**************************");
 		if level == "parser" then
-			print("A problem occurred while reading the config file "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua"..":");
+			print("A problem occured while reading the config file "..filename);
 			print("");
 			local err_line, err_message = tostring(err):match("%[string .-%]:(%d*): (.*)");
 			if err:match("chunk has too many syntax levels$") then
@@ -107,7 +107,7 @@ function read_config()
 			print("");
 		elseif level == "file" then
 			print("Prosody was unable to find the configuration file.");
-			print("We looked for: "..(CFG_CONFIGDIR or ".").."/prosody.cfg.lua");
+			print("We looked for: "..filename);
 			print("A sample config file is included in the Prosody download called prosody.cfg.lua.dist");
 			print("Copy or rename it to prosody.cfg.lua and edit as necessary.");
 		end
-- 
cgit v1.2.3