Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure proper read write access to root folder and db files #7724

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#include "common/syncjournaldb.h"

Check failure on line 16 in src/gui/folder.cpp

View workflow job for this annotation

GitHub Actions / build

src/gui/folder.cpp:16:10 [clang-diagnostic-error]

'common/syncjournaldb.h' file not found
#include "config.h"

#include "account.h"
Expand Down Expand Up @@ -543,7 +543,15 @@

// Immediately mark the sqlite temporaries as excluded. They get recreated
// on db-open and need to get marked again every time.
QString stateDbFile = _journal.databaseFilePath();
const auto stateDbFile = _journal.databaseFilePath();
const auto stateDbWalFile = QString(stateDbFile + QStringLiteral("-wal"));
const auto stateDbShmFile = QString(stateDbFile + QStringLiteral("-shm"));

FileSystem::setFileReadOnly(stateDbFile, false);
FileSystem::setFileReadOnly(stateDbWalFile, false);
FileSystem::setFileReadOnly(stateDbShmFile, false);
FileSystem::setFolderPermissions(path(), FileSystem::FolderPermissions::ReadWrite);

_journal.open();
_vfs->fileStatusChanged(stateDbFile + "-wal", SyncFileStatus::StatusExcluded);
_vfs->fileStatusChanged(stateDbFile + "-shm", SyncFileStatus::StatusExcluded);
Expand Down
Loading