Merge pull request #344 from selmf/fix_docroot_path

Server: Don't overwrite template and docroot path
This commit is contained in:
Luis Ángel San Martín 2022-10-23 19:30:16 +02:00 committed by GitHub
commit a07ac4a956
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,8 +53,8 @@ void YACReaderHttpServer::start(quint16 port)
#else
templatePath = QFileInfo(QCoreApplication::applicationDirPath(), baseTemplatePath).absoluteFilePath();
#endif
templateSettings->setValue("path", templatePath);
if (!templateSettings->contains("path"))
templateSettings->setValue("path", templatePath);
Static::templateLoader = new TemplateCache(templateSettings, app);
@ -84,7 +84,8 @@ void YACReaderHttpServer::start(quint16 port)
docroot = QFileInfo(QCoreApplication::applicationDirPath(), basedocroot).absoluteFilePath();
#endif
fileSettings->setValue("path", docroot);
if (!fileSettings->contains("path"))
fileSettings->setValue("path", docroot);
Static::staticFileController = new StaticFileController(fileSettings, app);