[Issue 14713] dmd -ofpath/to/bar calls mkdir -p to create a file anywhere

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jun 24 23:42:35 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14713

Timothee Cour <timothee.cour2 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |timothee.cour2 at gmail.com

--- Comment #2 from Timothee Cour <timothee.cour2 at gmail.com> ---
(In reply to Vladimir Panteleev from comment #1)
> > that's error prone and dangerous.
> 
> Why?

* the shell/command line is more error prone than using a library API and it's
easy for errors to creep in resulting in unwanted entire hierarchy structure
being created (that's what made me file this bug btw)

* it's easy enough for user to create the base directory first

* most importantly: that's the standard unix way. Pretty much NO unix tool
works the way dmd does, and for good reason:

eg, 'clang++ -c main.cc -o /tmp/d32/foo3/bar.o ' fails if /tmp/d32/foo3/
doesn't exist
mkdir requires -p to be recursive
same with cp, ln, etc etc

--


More information about the Digitalmars-d-bugs mailing list