[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #61338] mkdir silent on recreating existing di
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #61338] mkdir silent on recreating existing directory |
Date: |
Wed, 13 Oct 2021 11:06:23 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36 |
Update of bug #61338 (project octave):
Status: None => Fixed
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
Confirmed.
The issue seems to be that Matlab is trying very hard for Matlab compatibility
here. In the C++ function that is called by mkdir.m and does the real work I
find
if (fs && fs.is_dir ())
{
// For Matlab compatibility, return true when directory already exists.
return ovl (true, "directory exists", "mkdir");
}
I tested with Matlab and it allows
mkdir foo
mkdir foo
mkdir foo
repeatedly. Matlab does issue a warning in this case, rather than an error.
I changed Octave to do the same thing in this changeset
(http://hg.savannah.gnu.org/hgweb/octave/rev/120e878f343f).
Marking as fixed and closing report.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61338>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/