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

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Jun 19 17:34:28 PDT 2015


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

          Issue ID: 14713
           Summary: dmd -ofpath/to/bar calls mkdir -p to create a file
                    anywhere
           Product: D
           Version: D2
          Hardware: x86
                OS: All
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: timothee.cour2 at gmail.com

dmd -of/tmp/foo/bar/z01 main.d
creates /tmp/foo/bar/z01 even if parent dir doesn't exist (ie it must call the
equivalent of mkdir -p).
that's error prone and dangerous. just fail early if parent dir doesn't exist,
it's easy enough for user to create the dir if he really intended to as part of
his script. Or at least make it a non-default option.

Likewise, other flags need to be checked (eg -od etc)

--


More information about the Digitalmars-d-bugs mailing list