feat: add NameLen field to StatFs response and update related tests#335
Open
egalvis27 wants to merge 1 commit intofeat/go-fuse-daemonfrom
Open
feat: add NameLen field to StatFs response and update related tests#335egalvis27 wants to merge 1 commit intofeat/go-fuse-daemonfrom
egalvis27 wants to merge 1 commit intofeat/go-fuse-daemonfrom
Conversation
|
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.



Fix: File name is too long error when renaming files or folders
Problem
Nautilus (and other file managers) were showing "File name is too long" for any
rename attempt — even a single character — inside the Internxt virtual drive.
Root Cause
The
StatFsFUSE operation never populated theNameLen/f_namelenfield in thefilesystem statistics. This caused the mount to report a maximum filename length of
0 bytes. File managers call
statvfs()before validating a rename; withf_namelen = 0every name is considered too long.Fix
Return the standard Linux
NAME_MAXvalue (255) in thenameLenfield acrossthe full stack:
statfs.service.ts— addednameLen: NAME_MAX(255) toStatFsResultandto the value returned by
statfs().responses.go— addedNameLen uint32field toStatFsCallbackDataso theGo daemon can deserialize the value from Electron.
operations.go— setNameLen: response.NameLenin thefuse.StatfsOutreturned to the kernel.
Tests updated
statfs.service.test.ts— expected result now includesnameLen: 255.statfs.controller.test.ts— test fixture updated withnameLen: 255.operations_test.go— mock response includesnameLenand assertsstat.Namelen == 255.