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

Check if existing database files are writable #18124

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

victoryforce
Copy link
Collaborator

It may happen that we will not have write access to the database restored from a backup or snapshot. Running darktable with a database that cannot be written to may result in incorrect operation, the cause of which will be difficult to diagnose.

Such cases have already been reported in issues, for example in #17187 and #17726.

src/common/database.c Outdated Show resolved Hide resolved
@victoryforce victoryforce force-pushed the check-for-readonly-databases branch from 2273ce5 to bf1fe6e Compare January 1, 2025 12:03
@TurboGit TurboGit added this to the 5.2 milestone Jan 3, 2025
@TurboGit TurboGit added bugfix pull request fixing a bug feature: enhancement current features to improve labels Jan 3, 2025
Copy link
Member

@TurboGit TurboGit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good for me, 5.2 merge window opens in one or two weeks.

@victoryforce
Copy link
Collaborator Author

Just a few days ago there was a post on the pixls forum, where the cause of the bug was also a read-only database. I vaguely remember a few more complaints about buggy behavior, which, as it is now clear, was a consequence of the inability to write data to the database.

Also, recently one of the users in my local community restored databases from snapshots without paying attention to access rights, and had similar problems.

What I want to emphasize is that this is not a very rare case, and probably many more users have encountered this problem, but did not report it. Or they reported strange behavior on social networks or on forums, but this never led to a correct diagnosis of this problem (and remained unnoticed by the dt devs).

So I'll get back to my favorite thing again, convincing you to break the unwritten rule of not including in a corrective release anything that adds new text to the GUI... After all, the user will not see this text during normal operation in darktable, but only when the start of the program needs to be stopped, because the program will not be able to work. Even if some translators do not translate this warning text before the 5.0.1 release, it is better to have it in English than not to stop the program from running.

@TurboGit
Copy link
Member

TurboGit commented Jan 4, 2025

Well we have lived with that for a long time, between 5.0.1 and 5.2 there is 4 months, I won't break the rule (not introducing new strings) for that :)

@victoryforce
Copy link
Collaborator Author

Sigh...

@zisoft
Copy link
Collaborator

zisoft commented Jan 5, 2025

Some Mac users (#17222 (comment)) have a problem with wrong permissions on ~/.config so darktable cannot create the ~/.config/darktable directory.

In this case, darktable closes silently because the GUI is not initialized at that early stage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix pull request fixing a bug feature: enhancement current features to improve
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants