When you want to solve this on device driver level, the driver has to _know_ a 
directory has been opened with an aliased name. In the DIR case, I firmly 
believe it doesn't (but please do correct me if I'm wrong). My assumption was 
that it is within the flow of the DIR command that the aliasing happens (and 
DIR opens the directory with the unaliased name - which makes it rather 
impossible for the driver to handle this properly).

Tobias. 



-----Original-Nachricht-----
Betreff: Re: [Ql-Users] Odd behavour of the DIR command?
Datum: 2018-07-26T13:24:44+0200
Von: "Marcel Kilgus via Ql-Users" <ql-users@lists.q-v-d.com>
An: "ql-us...@q-v-d.com" <ql-us...@q-v-d.com>

Jan Bredenbeek via Ql-Users wrote:
> This has always been the problem with substitution devices. One solution
> would be to rewrite the io.fstrg/fs.headr/etc code to substitute the
> filenames read as well (essentially chop off the directory path
> substituted). In case of io.fstrg this means checking if the channel is
> opened for directory access, then check if the data read would be a file
> header (length=64), then change the filename read accordingly. In your own
> example when using INKEY$ from BASIC this would fail because INKEY$ reads
> one byte at a time (using io.fbyte).

Has anybody got the source code to the SUB device? It does this kind
of substitutions.

> Another solution would be to make the DIR command 'substitution-aware' so
> it would recognise a substituted device and act accordingly.

But then you have to do the same for QPAC2, QMenu, ...

Marcel

_______________________________________________
QL-Users Mailing List

_______________________________________________
QL-Users Mailing List

Reply via email to