ryanmcgrath/wrench-js — Issue #22: Bug with copyDirSyncRecursive and nested directories
Author: gjtorikian
Created: 2012-03-01 20:22:03+00:00
State: open

Let's say I do this command:

`copyDirSyncRecursive("./templates/assets", "out/assets");`

Then, I do this:

`copyDirSyncRecursive("./resources", "out")`

I would expect that the call like this just creates a new _resources_ directory under _out_. And it does--but it also erases the _out/assets_ directory made by the first one. The workaround is to do something like:

```
var srcDir = "./resources";
copyDirSyncRecursive(srcDir, "out" + "/" + path.basename(srcDir))
```