Repository navigation
fix: update .. on rename, reject dot-only names, remove needless dir flush - #66
Merged
Merged
Conversation
MabezDev
force-pushed
the
fix/directory-fixes-rebased
branch
2 times, most recently
from
May 1, 2026 17:12
97dbf65 to
577e2f9
Compare
bugadani
reviewed
May 2, 2026
| loop { | ||
| let raw_entry = DirEntryData::deserialize(&mut self.stream).await?; | ||
| // access time has changed | ||
| self.stream.flush().await?; |
Collaborator
There was a problem hiding this comment.
flush wasn't actually removed
bugadani
reviewed
May 2, 2026
| if name != "." && name != ".." { | ||
| let trimmed = name.trim_end_matches(|c| c == '.' || c == ' '); | ||
| if trimmed.is_empty() { | ||
| return Err(Error::InvalidFileNameLength); |
Collaborator
There was a problem hiding this comment.
Is this the right error to return? The length isn't the issue here, but the actual value is.
…ecessary flush - Update '..' entry to point to the new parent directory when rename_internal moves a directory between parents, as required by the FAT specification. - Reject filenames consisting entirely of dots and/or spaces in validate_long_name, since they are effectively empty after the FAT-mandated trailing dot/space trimming. The special '.' and '..' entries are exempted. - Remove the unconditional stream flush after every directory entry read in DirIter::read_dir_entry, which was a performance issue on embedded devices with no functional purpose.
… InvalidFileName Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bugadani
force-pushed
the
fix/directory-fixes-rebased
branch
from
October 23, 2026 18:33
577e2f9 to
32c48e0
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
..entry when a directory moves to a new parent. Write cluster 0 when the new parent is the root. Find..before the disk changes..and..withError::InvalidInput.Error::InvalidFileName.