This commit is contained in:
2018-05-31 21:01:41 +02:00
parent 4b1385c566
commit 787af11a57

View File

@ -17,6 +17,8 @@
using namespace std; using namespace std;
string webroot = "/srv/necronda/";
/** /**
@ -138,7 +140,12 @@ std::string formatSize(unsigned long bytes) {
} }
string getWebRoot(string host) { string getWebRoot(string host) {
return "/home/lorenz/Documents/Projects/Necronda-Server/necronda-server-3.0/webroot"; string root = webroot + host;
if (fileExists(root)) {
return root;
} else {
return webroot + "www.necronda.net";
}
} }