mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Merge pull request #344 from selmf/fix_docroot_path
Server: Don't overwrite template and docroot path
This commit is contained in:
commit
a07ac4a956
@ -53,7 +53,7 @@ void YACReaderHttpServer::start(quint16 port)
|
|||||||
#else
|
#else
|
||||||
templatePath = QFileInfo(QCoreApplication::applicationDirPath(), baseTemplatePath).absoluteFilePath();
|
templatePath = QFileInfo(QCoreApplication::applicationDirPath(), baseTemplatePath).absoluteFilePath();
|
||||||
#endif
|
#endif
|
||||||
|
if (!templateSettings->contains("path"))
|
||||||
templateSettings->setValue("path", templatePath);
|
templateSettings->setValue("path", templatePath);
|
||||||
|
|
||||||
Static::templateLoader = new TemplateCache(templateSettings, app);
|
Static::templateLoader = new TemplateCache(templateSettings, app);
|
||||||
@ -84,6 +84,7 @@ void YACReaderHttpServer::start(quint16 port)
|
|||||||
docroot = QFileInfo(QCoreApplication::applicationDirPath(), basedocroot).absoluteFilePath();
|
docroot = QFileInfo(QCoreApplication::applicationDirPath(), basedocroot).absoluteFilePath();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (!fileSettings->contains("path"))
|
||||||
fileSettings->setValue("path", docroot);
|
fileSettings->setValue("path", docroot);
|
||||||
|
|
||||||
Static::staticFileController = new StaticFileController(fileSettings, app);
|
Static::staticFileController = new StaticFileController(fileSettings, app);
|
||||||
|
Loading…
Reference in New Issue
Block a user