Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize internal storage file names #93

Merged
merged 1 commit into from
Aug 18, 2024

Conversation

Alphastaire
Copy link

Sanitize an internally downloaded file's name during save process to prevent file transfer error for Windows users. We do this via regex that finds specific characters (\/:*?"<>|) and replaces them with underscores. This will only affect the file names for internal storage. Users will still see the intended file name through the client since that's how the system is built.

This is a simple solution for #86.

@mxlgv
Copy link
Owner

mxlgv commented Aug 16, 2024

@Alphastaire I need time to test this.

libdino/src/service/file_manager.vala Outdated Show resolved Hide resolved
@mxlgv mxlgv linked an issue Aug 16, 2024 that may be closed by this pull request
@mxlgv mxlgv linked an issue Aug 16, 2024 that may be closed by this pull request
@Alphastaire Alphastaire force-pushed the windows-sanitize-filenames branch from 3374ac0 to 354d81d Compare August 17, 2024 01:13
libdino/src/service/file_manager.vala Outdated Show resolved Hide resolved
Sanitize an internally downloaded file's name during save process to prevent file transfer error for Windows users and potentially Linux users.
@Alphastaire Alphastaire force-pushed the windows-sanitize-filenames branch from 0ad67f3 to 8e94578 Compare August 17, 2024 21:55
@mxlgv mxlgv merged commit 91e7435 into mxlgv:master Aug 18, 2024
4 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.

Cannot receive files with characters not allowed on Windows
2 participants