Skip to content

Conversation

@foodprocessor
Copy link
Contributor

@foodprocessor foodprocessor commented May 1, 2025

Some functions in file cache take file lock items as parameters, just to signal to the coder that the lock should be acquired before calling the function. This change removes that and replaces it with code comments.

This also improves and simplifies file rename logic.
The biggest change in the logic is that we no longer reverse a rename when the local rename fails. Instead, we just delete the local source file and point any open handles to the new name.
This allows us to complete renames in more cases, without any risk of data loss.

@foodprocessor foodprocessor changed the title Add lock checks to prevent compile warnings (unused parameters) Stop using parameters as code comments May 1, 2025
@foodprocessor foodprocessor merged commit 2213b13 into main May 12, 2025
26 checks passed
@foodprocessor foodprocessor deleted the check-file-locks branch May 12, 2025 22:47
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.

2 participants