NetFS bugs

From BeebWiki
Jump to: navigation, search

When accessing an MDFS from RISC OS 3.xx, NetFS 5.xx sometimes causes problems as the MDFS can search for a file in the library as well as the current directory. NetFS 5.xx will sometimes fail with operations such as *Rename and *Access if the file exists in the library.

For instance, if the file %.fred exists, but @.fred does not, then sometimes the command *Rename jim fred fails as the *Rename command has been confused by the existance of the file in the library.

Even specifying the files in the current directory with *Rename @.jim @.fred sometimes also fails.

However, if you do an OSFILE 5 search immediately before the command, that appears to clear NetFS's "cache" of information and lets *Rename operate correctly, as with the following example:

   IF FNfile("@.fred",5)=0:OSCLI "Rename @.jim @.fred"

If you do want *Rename to generate an error if the destination file exists, you can use code similar to the following:

   A%=FNfile("@.fred",5):OSCLI "Rename @.jim @.fred"