Martin_Head wrote:What I think needs to happen, Is that instead of using the supplied name, DIR should 'decode' any DEV_USE, or NFS_USE first, before trying the compare.
Then all other code working with directories like the QPAC2 Files menu is still broken. If any effort is spent on this I think it would best be solved on the device driver level.
I don't see how the device driver can really solve this problem. Unless you do away with NFS_USE and DEV_USE entirely.
The only way that immediately comes to mind, is that the device driver would have to remember (in the channel definition block?) that the directory channel was opened using a NFS_USE substitution. Then whenever directory entries are read (and written?), actively patch the directory paths in the headers of the data it's reading, to suit what the DIR, or COPY or whatever, command is expecting.
This could be an awful mess, as the I/O routine in the driver has no idea if the directory was opened for a DIR, or someone is genuinely trying to read the directory.
Unless you have another solution that I have not thought of.
I did suggest a an idea to Giorgo of a work around for the problem in my Network driver, at the SBASIC level.
Code: Select all
DEFine Procedure XDIR (a$)
b$=NFS_USE$(a$(4))&a$(6 TO )
END DEFine XDIR
This procedure decodes the NFS_USE name back to a real name.
When you want to do a sub directory of a NFS_USE device e.g. DIR SHD1_FIFI_ do XDIR "SHD1_FIFI_" instead.
I do appreciate the potential problems of trying to change the way the the wild card comparisons work in SMSQ/E and how it can have detrimental effects in other places.