www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22649] New: DUB: recursive `copyFiles` is broken

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

          Issue ID: 22649
           Summary: DUB: recursive `copyFiles` is broken
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: tools
          Assignee: nobody puremagic.com
          Reporter: ogion.art gmail.com

Created attachment 1837
  --> https://issues.dlang.org/attachment.cgi?id=1837&action=edit
Example project

The project is structured like this:
  bundle/1/1.txt
  bundle/1/2/2.txt
  source/app.d
  dub.json

dub.json:
{
  "name" : "app",
  "targetPath": "build",
  "copyFiles" : ["bundle/*"]
}

Running DUB should create a `build` folder containing:
  1/1.txt
  1/2/2.txt
  app.exe

Instead, `build` looks like this:
  1/1.txt
  1/2/2.txt
  2/2.txt
  1.txt
  2.txt
  app.exe

I’m using DUB v1.27.0 that ships with DMD v2.098.1.

--
Jan 04 2022