isdir("w:") returns %t even when the drive w: does not exist (5.0 regression)
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
I was running fileio tests and see that bug_2181 does not pass.
Investigating why, i have found that since Scilab 5.1 (and likely 5.0),
isdir("w:") (or any other drive unique letter) returns %T even when w:\
does not actually exist!
The short description of isdir() was ambiguous until
https://codereview.scilab.org/#/c/19641/31/scilab/modules/fileio/help/en_US/directory/isdir.xml
The problem with the other possible meaning -- the argument has a dir-like syntax,
whether it actually exists or not -- is that
a) it is not the one used in the above test
b) it was not how it used to work with Scilab 4.1.2
The problem with the current 5.x and 6.0.1 meaning is that
while isdir("w:") returns %t since the syntax is correct, then
isdir("w:\idonotexist") should return %T as well (since the syntax is correct as well),
while it does not: %f is returned.
This is why
a) fixing the documentation was really mandatory
and now
b) fixing isdir(w:) is so as well, to return %T only if W: actually exists.
ERROR LOG:
----------
None. Wrong answer
HOW TO REPRODUCE THE BUG:
-------------------------
~isdir("w:") // provided that you don't have any w: drive
OTHER INFORMATION:
------------------
Tested with 4.1.2, 5.1.0 and 6.0.1 on Win7 64 bits