[ADFS] Replace '/' for '.'.

This commit is contained in:
2026-03-29 13:08:49 +01:00
parent 24e78635ff
commit f08d1304b5
2 changed files with 12 additions and 0 deletions

View File

@@ -84,6 +84,10 @@ public sealed partial class AcornADFS
{
string component = pathComponents[p];
// ADFS uses '.' as path separator, so '.' in the user path must be converted to '/'
// for internal name matching (on-disk names use '/' where '.' would appear)
component = component.Replace('.', '/');
// Find the component in current directory
if(!currentEntries.TryGetValue(component, out DirectoryEntryInfo entry)) return ErrorNumber.NoSuchFile;
@@ -146,6 +150,10 @@ public sealed partial class AcornADFS
// Get current filename and advance position
filename = acornNode.EntryNames[acornNode.Position++];
// In ADFS, the dot (.) is the path separator, not the forward slash (/)
// Convert forward slashes in filenames to dots for proper RISC OS representation
filename = filename.Replace('/', '.');
return ErrorNumber.NoError;
}

View File

@@ -636,6 +636,10 @@ public sealed partial class AcornADFS
{
string component = pathComponents[p];
// ADFS uses '.' as path separator, so '.' in the user path must be converted to '/'
// for internal name matching (on-disk names use '/' where '.' would appear)
component = component.Replace('.', '/');
// Find the component in current directory
if(!currentEntries.TryGetValue(component, out DirectoryEntryInfo foundEntry)) return ErrorNumber.NoSuchFile;