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

radisk: md5 hash file names > 255 characters #1072

Closed
wants to merge 1 commit into from

Conversation

nsreed
Copy link

@nsreed nsreed commented May 1, 2021

This solves the issue of radisk attempting to write to filenames with lengths exceeding the 255 character limit of most filesystems (issue here: #1070).

This is a different approach than that used in #1005 and touches only the ename function. If the sanitized file name would exceed the limit set by opt.maxKeyLength (and maxKeyLength is greater than 32 bytes required for the hash), I return an MD5 hash instead. The modification should also leave the browser radisk functionality untouched, to avoid compatibility issues. If this is a bad approach, or I haven't fully understood how ename works, my apologies.

I do not know whether it is necessary to add the hashes to the %1C file, since the path hashes are deterministic. If this is necessary, I need guidance on how to interact with that file. I have created a Map of paths to their respective hashes for performance's sake, though it may take up too much memory over a long enough span of time.

@nsreed
Copy link
Author

nsreed commented May 1, 2021

Well... CI has spoken. Back to the drawing board.

@nsreed nsreed closed this May 1, 2021
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.

1 participant