Behavior of 'mkdir'

John W. Eaton jwe at bevo.che.wisc.edu
Wed Jul 23 08:25:37 CDT 2008


On 23-Jul-2008, Jaroslav Hajek wrote:

| I'd like to also notice that Matlab manual states that mkdir returns 1
| on success and 0 on failure, so apparently they consider a mkdir of
| existing directory as success (but they explain more in the next
| paragraph).
| In the same situation, GNU's mkdir reports a failure, so I assume
| that's what POSIX wants. Can anyone check the Windows MKDIR? I'd
| expect the same behaviour. Given that, I think that Octave's way makes
| more sense and I'd vote for leaving it as it is.

Making more sense and providing something that is useful to Octave
users who want compatibility appear to conflict here.  So it may be
better to provide compatible behavior.  I know that is what I would
prefer to have if I were porting some Matlab code to Octave that
relied on this feature, because then the code would just work and I
wouldn't have to pause and think about what to do and meanwhile curse
the idiot Octave developers who tried to do the "right thing" (more
likely, I wouldn't know what the "right thing" was and would just
think the developers were idiots).

jwe


More information about the Octave-maintainers mailing list