mirror of
https://github.com/YACReader/yacreader
synced 2025-07-26 17:04:45 -04:00
merged changes
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
#include "static.h"
|
||||
#include <QApplication>
|
||||
|
||||
|
||||
StaticFileController::StaticFileController(QSettings* settings, QObject* parent)
|
||||
:HttpRequestHandler(parent)
|
||||
{
|
||||
@ -25,8 +26,8 @@ StaticFileController::StaticFileController(QSettings* settings, QObject* parent)
|
||||
#endif
|
||||
{
|
||||
#if defined Q_OS_UNIX && ! defined Q_OS_MAC
|
||||
QFileInfo configFile(QString(DATADIR)+"/YACReader");
|
||||
docroot=QFileInfo(QString(DATADIR)+"/YACReader",docroot).absoluteFilePath();
|
||||
QFileInfo configFile(QString(DATADIR)+"/yacreader");
|
||||
docroot=QFileInfo(QString(DATADIR)+"/yacreader",docroot).absoluteFilePath();
|
||||
#else
|
||||
QFileInfo configFile(QApplication::applicationDirPath());
|
||||
docroot=QFileInfo(QApplication::applicationDirPath(),docroot).absoluteFilePath();
|
||||
|
@ -23,8 +23,8 @@ TemplateLoader::TemplateLoader(QSettings* settings, QObject* parent)
|
||||
#endif
|
||||
{
|
||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||
QFileInfo configFile(QString(DATADIR)+"/YACReader");
|
||||
templatePath=QFileInfo(QString(DATADIR)+"/YACReader",templatePath).absoluteFilePath();
|
||||
QFileInfo configFile(QString(DATADIR)+"/yacreader");
|
||||
templatePath=QFileInfo(QString(DATADIR)+"/yacreader",templatePath).absoluteFilePath();
|
||||
#else
|
||||
QFileInfo configFile(QApplication::applicationDirPath());
|
||||
templatePath=QFileInfo(QApplication::applicationDirPath(),templatePath).absoluteFilePath();
|
||||
|
@ -122,9 +122,7 @@ void RequestMapper::service(HttpRequest& request, HttpResponse& response) {
|
||||
HttpSession session=Static::sessionStore->getSession(request,response,false);
|
||||
if(!session.isNull() && session.contains("ySession"))
|
||||
{
|
||||
//
|
||||
|
||||
if(library.indexIn(path)!=-1 && DBHelper::getLibraries().contains(library.cap(1).toInt()) )
|
||||
if(library.indexIn(path)!=-1 && DBHelper::getLibraries().contains(library.cap(1).toInt()) )
|
||||
{
|
||||
//listar el contenido del folder
|
||||
if(folder.exactMatch(path))
|
||||
|
@ -27,7 +27,7 @@ QString Static::getConfigDir() {
|
||||
}
|
||||
// Search config file
|
||||
#if defined Q_OS_UNIX && !defined Q_OS_MAC
|
||||
QString binDir=(QString(DATADIR) + "/YACReader");
|
||||
QString binDir=(QString(DATADIR)+"/yacreader");
|
||||
#else
|
||||
QString binDir=QCoreApplication::applicationDirPath();
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user