Fix Windows-specific rasterfile module issue with file names that contain Unicode characters #19063
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.
This problem is not reproducible on Linux, only on Windows. So I would be grateful for comments with confirmation from those who have the opportunity to work with darktable on Windows. For me the problem is reproducible on both Windows 10 and Windows 11.
Steps for reproduction:
×
, (U+00D7)) to the configured folder.In the pfm files menu, instead of the name of this file, there will be an empty line, and the file itself will not be applied to the selected image as a mask (due to failure to open a file with that name).
@TurboGit This is a bug fix, so for 5.2.1. But if you want a minimal change for a corrective release, you can take only the first commit. Other commits are maintenance and additional protection from unsanitized data.
A separate commit normalizes the file name before opening in dt_read _pfm, which is even redundant and doing nothing if we guarantee normalization before calling the function. But this PR is just about the fact that this was not done, so in a function that can be used elsewhere in the code, it is better to have its own data sanitization.