Skip to content

fix(headless): correct default dictionary backup path - #2443

Open
dvd233 wants to merge 1 commit into
tencentmusic:masterfrom
dvd233:codex/fix/localfileconfig-backup-path-2431
Open

dvd233 wants to merge 1 commit into
tencentmusic:masterfrom
dvd233:codex/fix/localfileconfig-backup-path-2431

Conversation

@dvd233

@dvd233 dvd233 commented Sep 18, 2026

Copy link
Copy Markdown

Description

Fixes #2431.

LocalFileConfig prepends the directory containing hanlp.properties to both default dictionary paths. The backup default started with ./data, which produced conf./data/dictionary/backup after string concatenation. Align the backup default with the latest dictionary default so the packaged path is conf/data/dictionary/backup.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature
  • Breaking change
  • This change requires a documentation update

How Has This Been Tested?

  • git diff --check passed.
  • Added LocalFileConfigTest to lock the corrected default value.
  • Maven tests could not be run locally because this environment does not have JDK 21 or Maven installed; repository CI should provide the runtime verification.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (no new complex logic)
  • I have made corresponding changes to the documentation (not required for this bug fix)
  • I have added a regression test for the fix
  • New and existing unit tests pass locally (Maven unavailable in the local environment)

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.

[Bug] LocalFileConfig default backup dictionary path creates unexpected conf. directory

1 participant