2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Use custom workdir even if it doesn't exist

This commit is contained in:
Ilya Fedin
2023-02-19 07:18:17 +04:00
committed by John Preston
parent 8099c28197
commit 9849b7adb6
3 changed files with 3 additions and 8 deletions

View File

@@ -51,6 +51,7 @@ DeclareSetting(QString, WorkingDir);
inline void cForceWorkingDir(const QString &newDir) {
cSetWorkingDir(newDir);
if (!gWorkingDir.isEmpty()) {
cSetWorkingDir(QDir(gWorkingDir).absolutePath() + '/');
QDir().mkpath(gWorkingDir);
QFile::setPermissions(gWorkingDir,
QFileDevice::ReadUser | QFileDevice::WriteUser | QFileDevice::ExeUser);