If a name's already in use, what's the right response to an attempt to over-write it? For a regular file, if it's write-enabled, doing so might be the right response, since that's consistent with the current behaviour. For a directory, attempting to re-use an existing name is more likely to be an error, regardless of the nature of the named file. In that case it should fail, and indicate that it has done so.
On 3/23/16, Elizabeth Mattijsen <[email protected]> wrote: > >> On 23 Mar 2016, at 14:16, Rob Hoelz (via RT) >> <[email protected]> wrote: >> >> # New Ticket Created by Rob Hoelz >> # Please include the string: [perl #127772] >> # in the subject line of all future correspondence about this issue. >> # <URL: https://rt.perl.org/Ticket/Display.html?id=127772 > >> >> >> To reproduce: >> >> $ touch /tmp/my-fake-directory >> $ perl6 -e 'say ?mkdir("/tmp/my-fake-directory")' >> True >> >> I understand that we want to succeed in the common case that that >> directory already exists, but I'm wondering if that's the correct behavior >> and whether we should leave handling that case up to the user. > > FWIW, I think this is really a problem in the lower level nqp::mkdir() > always returning True.
