This is the code `dereference` influences:
https://github.com/jprichardson/node-fs-extra/blob/402c1d05727f2f9414a4905ffa75f4fa1d99461c/lib/copy-sync/copy-sync.js#L40-L47

Previosuly, this did use `fs.lstatSync` to get information on the directory, 
which concluded that it is a symlink, not a directory, and executed `onLink` 
which creates another symlink 
https://github.com/jprichardson/node-fs-extra/blob/402c1d05727f2f9414a4905ffa75f4fa1d99461c/lib/copy-sync/copy-sync.js#L129
 Unfortunately this one didn't properly work on Windows because... 
@oliversalzburg will have to explain that part. (my interpretation: it created 
a symlink for a file, which is bad if the target is a folder.)

Now, with the option, `fs.statSync` is used which looks inside the actual 
symlink and discovers the folder. Then `onDir` is triggered, which does more 
useful things.

In normal usage of the method this is possibly not even a problem, but in the 
test setup the `Test1` plugin in Test #029 is first symlinked to a location in 
node_modules, and then that one is copied/symlinked again into the new project. 
If the code operates on a real folder, not a symlink, it worked before as it 
should.

[ Full content available at: https://github.com/apache/cordova-lib/pull/705 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to