-
Notifications
You must be signed in to change notification settings - Fork 540
NAS-139149 / 26.04 / batch cryptdecode #17941
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a bug where directories with more than 10 encrypted files would not have their names decrypted in the UI. The issue was caused by rclone's cryptdecode command having a hard limit of 10 items per call. The fix batches the encrypted filenames into groups of 10 and processes them sequentially.
Key Changes
- Introduced batching logic to process encrypted filenames in groups of 10
- Added clear comments explaining the rclone cryptdecode limit
- Maintained existing error handling and result accumulation logic
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1e4ffb7 to
9496a60
Compare
yocalebo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Though.... I hate we're fork+exec'ing here
|
Note: *Due to itertools.batched, this cant backported to 25.10.2 |
|
This PR has been merged and conversations have been locked. |
After figuring out why the UI wouldnt show the decrypted dir names (truenas/webui#13058)
I saw that one of my buckets wouldn't show the decrypted names for the root dir, but would for subdirs.
It looks like the cryptdecode has a hard limit of 10 items per call (https://github.com/rclone/rclone/blob/28c187b9b49a9785a7f47a802c74e8a8aedf11c6/cmd/cryptdecode/cryptdecode.go#L48). So in this PR i'm batching the file names to cryptdecode.
Backport to 25.10.2 would be nice.