Skip to content

Do not save rocksdict config when open in read-only modes#186

Merged
Congyuwang merged 1 commit into
rocksdict:mainfrom
ShadingClouds:main
Jan 16, 2026
Merged

Do not save rocksdict config when open in read-only modes#186
Congyuwang merged 1 commit into
rocksdict:mainfrom
ShadingClouds:main

Conversation

@ShadingClouds

Copy link
Copy Markdown
Contributor

In the current implementation of RocksDict, when opening a Rdict, it will save the RocksDict config file to the directory. However, if that directory is read-only, writing the config file will fail.

Currently the config file is saved to allow further construction of Rdict without need to specify the same config, so skip saving the config file will not affect the main functionality.

So in this PR, we propose to skip saving config if we open Rdict in read-only modes (ReadOnly and Secondary). This allows us to open a dictionary in a read-only directory.

@Congyuwang
Congyuwang merged commit e7205d9 into rocksdict:main Jan 16, 2026
0 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants