Commit 7587ab10 authored by John Ballance's avatar John Ballance
Browse files

Resolved issue where RISC OS name '1 2/3' gets wrongly translated.

Detail:
The translate routine that converts contentious characters in  a RiscOS
file name to equivalent DOS ones was being invoked a second time. Normally
this wouldn't be critical, but a / in riscos was converted to the . in DOS,
correctly , then converted back again. This error mode with more than one
contentious character in (particularly) a directory name had recently
come to light.
Admin:
Tested by building a RiscOS rom image on a pc based LanManFS mount without
errors.

Version 2.60. Tagged as 'LanManFS-2_60'
parent 98a15172
......@@ -840,6 +840,12 @@ static err_t Xlt_NameROtoDOSX2_sub ( char *dst, char *src, int level )
debug1("Xlt_NameROtoDOSX2 initiates a dir search of `%s'\n",
private.dstcpybuf);
#if 0
// if I'm not mistaken, the previous translate gets all the contentious chars
// so if the result contains translated chars that would then be contentious
// in riscos, they get retranslated to give incorrect result.
// e.g. riscos '.1 /s' becomes 'A:\1 .s' as expected.
// Second pass takes it to 'A:\1 \s' which is incorrect.
if (level == 0)
for (inptr = private.dstcpybuf + 2 + level; inptr != private.dstcpy; ++inptr) {
if (Xlt_ContentiousCharCheck(*inptr, *inptr)) {
......@@ -889,7 +895,7 @@ static err_t Xlt_NameROtoDOSX2_sub ( char *dst, char *src, int level )
inptr = private.dstcpybuf + len;
}
}
#endif
debug1("Xlt_NameROtoDOSX2 initiates a dir search of `%s' (post-mangle)\n",
private.dstcpybuf);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment