fix: fallback to shared_data_dir when loading ReverseDb - #430
Merged
hchunhui merged 1 commit intoApr 26, 2026
Merged
Conversation
ReverseDb previously only looked up files from user_data_dir. This breaks deployments where read-only data files are installed under shared_data_dir, such as packaged environments. Try user_data_dir first and fall back to shared_data_dir when the target file does not exist. Keep user overrides intact by preserving the existing precedence. Apply the same behavior to both legacy and newer COMPAT branches. Signed-off-by: DeepChirp <DeepChirp@outlook.com>
Owner
|
Thanks! |
3 tasks
sabertaz
added a commit
to sabertaz/dotfiles
that referenced
this pull request
Jun 19, 2026
PR hchunhui/librime-lua#430 makes ReverseDb fall back to shared_data_dir, so librime-lua now finds /usr/share/rime-data/lua/lunar.db directly. Remove the symlink workaround (427d98c) and its verify-script check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ReverseDbonly searchesuser_data_dir, but some packaged deployments place read-only db files inshared_data_dir.A concrete example is iDvel/rime-ice#1526, which rewrote
lunar.luato useReverseDb("lua/lunar.db"). On Arch Linux, that db is packaged at/usr/share/rime-data/lua/lunar.db(seerime-ice-gitpackage on AUR). As a result, the file is not found and the lunar feature does not work.Change
When loading
ReverseDb, keepuser_data_diras the first choice. If the target file does not exist, fall back toshared_data_dir.Apply the same logic to both
COMPATbranches.