Page 1 of 1
I don't think this is meant to happen
Posted: Mon Sep 05, 2016 10:29 am
by crishog
'd:\tmp'⎕ncreate ¯1
'd:\tmp'⎕nerase ¯1
So far so good, but
'd:\tmp'⎕ncreate ¨¯1
⎕NINFO ¯1
d:/tmp
'd:\tmp'⎕NERASE ¯1
FILE NAME ERROR: File name mismatch
'd:\tmp'⎕NERASE ¯1
∧
'd:/tmp'⎕NERASE ¯1
Does work
⎕NAMES also shows that the "\" has flipped to "/" after a call to ⎕NINFO
Re: I don't think this is meant to happen
Posted: Mon Sep 05, 2016 10:54 am
by Dick Bowman
Some weeks ago I suggested to Dyalog that it would be preferable (at least for me) if we were able to set what we wanted to use as filename separator - normalising file names through ⎕NPARTS, which seemed like a sensible thing to do, throws up a number of problems if you then try to use the filenames with other Windows components.
You can see that Dialog themselves contort code to deal with this - look at the SALTUtils namespace.
On the whole, I'd like to see filename separator either as something we can specify ourselves or as a system constant determined by checking the host OS.
Re: I don't think this is meant to happen
Posted: Wed Sep 07, 2016 3:47 pm
by Richard|Dyalog
You are quite right; it is not meant to happen. Querying the name of a tied file with ⎕NINFO is not supposed to change the name associated with it - that it apparently has done breaks ⎕NERASE as you demontrate. We will raise a bug report for this and fix it.