[Bugzilla] [Bug 15484] New: isdir("w:") returns %t even when the drive w: does not exist (5.0 regression)

bugzilla.admin at scilab.org bugzilla.admin at scilab.org
Mon Mar 12 21:15:41 CET 2018


http://bugzilla.scilab.org/show_bug.cgi?id=15484
--------- Bug Summary -----------
isdir("w:") returns %t even when the drive w: does not exist (5.0 regression)

---------- Changed by ------------
sgougeon at free.fr

---------- What changed ----------
bug_id, short_desc, product, version, rep_platform, op_sys, bug_status, bug_severity, priority, component, assigned_to, reporter


            Bug ID: 15484
           Summary: isdir("w:") returns %t even when the drive w: does not
                    exist (5.0 regression)
           Product: Scilab software
           Version: 5.0 through 5.3.x
          Hardware: (not used)
                OS: All Windows
            Status: NEW
          Severity: Medium
          Priority: (field not used)
         Component: Input / output
          Assignee: bugzilla.admin at scilab.org
          Reporter: sgougeon at free.fr

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

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/bugzilla/attachments/20180312/f239a996/attachment.htm>


More information about the Bugzilla mailing list