From 74bcbc6c7adbdc90555c7fa3ec00df5f68d41256 Mon Sep 17 00:00:00 2001 From: DavidXanatos Date: Sat, 28 May 2022 15:20:17 +0200 Subject: [PATCH] 1.1.1 --- SandboxiePlus/QSbieAPI/Sandboxie/SbieIni.cpp | 4 ++-- SandboxiePlus/QSbieAPI/Sandboxie/SbieIni.h | 2 +- SandboxiePlus/QSbieAPI/Sandboxie/SbieTemplates.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SandboxiePlus/QSbieAPI/Sandboxie/SbieIni.cpp b/SandboxiePlus/QSbieAPI/Sandboxie/SbieIni.cpp index 99a2ad01..3a7e7722 100644 --- a/SandboxiePlus/QSbieAPI/Sandboxie/SbieIni.cpp +++ b/SandboxiePlus/QSbieAPI/Sandboxie/SbieIni.cpp @@ -59,9 +59,9 @@ SB_STATUS CSbieIni::SetBool(const QString& Setting, bool Value) return SetText(Setting, Value ? "y" : "n"); } -QString CSbieIni::GetText(const QString& Setting, const QString& Default, bool bWithGlobal) const +QString CSbieIni::GetText(const QString& Setting, const QString& Default, bool bWithGlobal, bool bNoExpand) const { - int flags = (bWithGlobal ? 0 : CONF_GET_NO_GLOBAL) | CONF_GET_NO_EXPAND; + int flags = (bWithGlobal ? 0 : CONF_GET_NO_GLOBAL) | (bNoExpand ? CONF_GET_NO_EXPAND : 0); QString Value = m_pAPI->SbieIniGet(m_Name, Setting, flags); if (Value.isNull()) Value = Default; return Value; diff --git a/SandboxiePlus/QSbieAPI/Sandboxie/SbieIni.h b/SandboxiePlus/QSbieAPI/Sandboxie/SbieIni.h index 30172e54..80425e59 100644 --- a/SandboxiePlus/QSbieAPI/Sandboxie/SbieIni.h +++ b/SandboxiePlus/QSbieAPI/Sandboxie/SbieIni.h @@ -20,7 +20,7 @@ public: virtual SB_STATUS SetNum64(const QString& Setting, __int64 Value); virtual SB_STATUS SetBool(const QString& Setting, bool Value); - virtual QString GetText(const QString& Setting, const QString& Default = QString(), bool bWithGlobal = false) const; + virtual QString GetText(const QString& Setting, const QString& Default = QString(), bool bWithGlobal = false, bool bNoExpand = true) const; virtual int GetNum(const QString& Setting, int Default = 0, bool bWithGlobal = false) const; virtual __int64 GetNum64(const QString& Setting, __int64 Default = 0, bool bWithGlobal = false) const; virtual bool GetBool(const QString& Setting, bool Default = false, bool bWithGlobal = false) const; diff --git a/SandboxiePlus/QSbieAPI/Sandboxie/SbieTemplates.cpp b/SandboxiePlus/QSbieAPI/Sandboxie/SbieTemplates.cpp index 84ad59f6..9e8e5d33 100644 --- a/SandboxiePlus/QSbieAPI/Sandboxie/SbieTemplates.cpp +++ b/SandboxiePlus/QSbieAPI/Sandboxie/SbieTemplates.cpp @@ -329,7 +329,7 @@ bool CSbieTemplates::CheckTemplate(const QString& Name) { QSharedPointer pTemplate = QSharedPointer(new CSbieIni("Template_" + Name, m_pAPI)); - QString scan = pTemplate->GetText("Tmpl.Scan"); + QString scan = pTemplate->GetText("Tmpl.Scan", QString(), false, false); BOOL scanIpc = (scan.indexOf(L'i') != -1); BOOL scanWin = (scan.indexOf(L'w') != -1); BOOL scanSvc = (scan.indexOf(L's') != -1);