Skip to content

fix: make rename() subdir check UTF-8 safe#295

Merged
lzjqsdd merged 1 commit intoCurvineIO:mainfrom
boneanxs:rename_fix
Sep 22, 2025
Merged

fix: make rename() subdir check UTF-8 safe#295
lzjqsdd merged 1 commit intoCurvineIO:mainfrom
boneanxs:rename_fix

Conversation

@boneanxs
Copy link
Copy Markdown
Contributor

For the path contains multi char characters(such as /a/b/äå), The comparison &dst[src.len()..src.len() + 1] == PATH_SEPARATOR is not safe, we could meet the error like byte index 1 is not a char boundary.

Also fix some typo issues from the file

@szbr9486
Copy link
Copy Markdown
Contributor

The error has occurred when you test Curvine cache or it happened in other system that you had met?

@lzjqsdd lzjqsdd merged commit e0b7dbb into CurvineIO:main Sep 22, 2025
3 checks passed
@lzjqsdd lzjqsdd added the bug Something isn't working label Sep 22, 2025
Coderlxl pushed a commit to Coderlxl/curvine that referenced this pull request Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants