Skip to content

Commit

Permalink
1.15.5
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidXanatos committed Jan 18, 2025
1 parent 2f430f1 commit 83d96d9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Added
- added 'HookTrace=y' to debug API hooking

### Changed
- moved Sandboxie-Plus data folder from C:\Users\[User]\AppData\Local\Sandboxie-Plus to C:\Users\[User]\AppData\Local\Xanasoft\Sandboxie-Plus
- note: the folder will be moved automatically, when downgrading to an older version you woul need to move it back manually.

### Fixed
- fixed crash when pressing run as admin with non-advanced view
- fixed WerFault.exe errors for all applications on the latest Windows 11 ARM64 [#4422](https://github.com/sandboxie-plus/Sandboxie/issues/4422)
Expand Down
10 changes: 5 additions & 5 deletions SandboxiePlus/MiscHelpers/Common/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ bool TestWriteRight(const QString& Path)
return TestFile.remove();
}

CSettings::CSettings(const QString& AppDir, const QString& AppName, QMap<QString, SSetting> DefaultValues, QObject* qObject) : QObject(qObject)
CSettings::CSettings(const QString& AppDir, const QString& GroupName, const QString& AppName, QMap<QString, SSetting> DefaultValues, QObject* qObject) : QObject(qObject)
{
m_ConfigDir = AppDir;
if (!(m_bPortable = QFile::exists(m_ConfigDir + "/" + AppName + ".ini")))
{
QStringList dirs = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
if (dirs.isEmpty())
m_ConfigDir = QDir::homePath() + "/." + AppName;
m_ConfigDir = QDir::homePath() + "/." + GroupName + "/" + AppName;
//
// if ini is present in the shared location it take precedence over an ini in a user location
//
else if(dirs.count() > 2 && QFile::exists(dirs[1] + "/" + AppName + "/" + AppName + ".ini"))
m_ConfigDir = dirs[1] + "/" + AppName;
else if(dirs.count() > 2 && QFile::exists(dirs[1] + "/" + GroupName + "/" + AppName + "/" + AppName + ".ini"))
m_ConfigDir = dirs[1] + "/" + GroupName + "/" + AppName;
else
m_ConfigDir = dirs[0] + "/" + AppName;
m_ConfigDir = dirs[0] + "/" + GroupName + "/" + AppName;
QDir().mkpath(m_ConfigDir);
}

Expand Down
2 changes: 1 addition & 1 deletion SandboxiePlus/MiscHelpers/Common/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class MISCHELPERS_EXPORT CSettings: public QObject
virtual bool IsBlob() const {return true;}
};

CSettings(const QString& AppDir, const QString& AppName, QMap<QString, SSetting> DefaultValues = QMap<QString, SSetting>(), QObject* qObject = NULL);
CSettings(const QString& AppDir, const QString& GroupName, const QString& AppName, QMap<QString, SSetting> DefaultValues = QMap<QString, SSetting>(), QObject* qObject = NULL);
virtual ~CSettings();

void DelValue(const QString& key);
Expand Down
19 changes: 18 additions & 1 deletion SandboxiePlus/SandMan/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,25 @@ int main(int argc, char *argv[])
QString ConfDir = AppDir + "\\PlusData";
if(!QFile::exists(ConfDir))
ConfDir = AppDir;
else // todo: Remove import at some later point
{
QStringList dirs = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
if (dirs.count() > 2) { // Note: last 2 are AppDir and AppDir/data
QString OldPath;
QString NewPath;
if (dirs.count() > 3 && QFile::exists((OldPath = dirs[1] + "/Sandboxie-Plus") + "/Sandboxie-Plus.ini"))
NewPath = dirs[1] + "/Xanasoft";
else if (QFile::exists((OldPath = dirs[0] + "/Sandboxie-Plus") + "/Sandboxie-Plus.ini"))
NewPath = dirs[0] + "/Xanasoft";

if (!NewPath.isEmpty() && !QFile::exists(NewPath + "/Sandboxie-Plus" + "/Sandboxie-Plus.ini")){
QDir().mkpath(NewPath);
QDir().rename(OldPath, NewPath + "/Sandboxie-Plus");
}
}
}
// use a shared setting location when used in a business environment for easier administration
theConf = new CSettings(ConfDir, "Sandboxie-Plus");
theConf = new CSettings(ConfDir, "Xanasoft", "Sandboxie-Plus");

#ifndef _DEBUG
InitMiniDumpWriter(QString("SandMan-v%1").arg(CSandMan::GetVersion()).toStdWString().c_str() , QString(theConf->GetConfigDir()).replace("/", "\\").toStdWString().c_str());
Expand Down

0 comments on commit 83d96d9

Please sign in to comment.