Skip to content

dos: strip volume specifier in getpacketinfo#801

Open
bsek wants to merge 1 commit into
aros-development-team:masterfrom
bsek:dos_packethelper_strip_volume
Open

dos: strip volume specifier in getpacketinfo#801
bsek wants to merge 1 commit into
aros-development-team:masterfrom
bsek:dos_packethelper_strip_volume

Conversation

@bsek
Copy link
Copy Markdown
Contributor

@bsek bsek commented May 15, 2026

Strip the volume/assign specifier before handing the name to the filesystem handler. GetDeviceProc() resolves the prefix to the correct handler + base lock, and the handler expects the remaining relative path - not the original name with a ':' still in it.

Without this, handlers whose path parser treats ':' as a "reset to root" marker (at least the fat handler) end up searching the wrong directory and returning OBJECT_NOT_FOUND.

Strip the volume/assign specifier before handing the name to the
filesystem handler. GetDeviceProc() resolves the prefix to the
correct handler + base lock, and the handler expects the remaining
relative path - not the original name with a ':' still in it.
Lock() in lock.c does the same. Without this, handlers whose
path parser treats ':' as a "reset to root" marker (e.g. fat) end
up searching the wrong directory and returning OBJECT_NOT_FOUND.
@Kalamatee
Copy link
Copy Markdown
Member

Need to confirm if this behaviour is correct against amigaos.

@deadwood2
Copy link
Copy Markdown
Contributor

If that's of any help, I created a "replacement" header which allows compiling cunit tests for AmigaOS. This way the same test can be added to AROS and be used to verify behavior with AmigaOS:

https://github.com/deadwood2/AROS/blob/master/developer/debug/test/test-util.h

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.

3 participants