Closed ewochtl closed 3 years ago
Hey! Thank you for creating an issue here.
First of all, you are using both crawlWithOptions
and the Builder pattern; they don't work well together. crawlWithOptions
overrides the other options. So the correct usage would be:
const fdir = require("fdir")
var paths = "R:\\"
var files = new fdir().withDirs().withMaxDepth(3).withBasePath().withErrors().crawl(paths).sync();
files.forEach(file_path => {
console.log(file_path)
})
Try the above code, perhaps it will fix your bug. I have no Windows PC where I could reproduce this bug however, I will try to be as helpful as possible if you decide to debug and fix this yourself. I haven't tried fdir with network drives so your contribution with regards to that would be most welcome!
Hi, thanks for your responding. Unfortunately your Code didn't change the result. It's still the same output. Can you send me instructions, how i can debug the module or how i can enable advanced logging. Regards
Have you tried with fdir v5?
@papb Thanks for your help Still no changes with fdir 5.0 But I've tested a snippet for directory listing from Stack Overflow: https://stackoverflow.com/a/5827895/14878833 When I run this, it works fine.
@ewochtl if you have nvm
try out fdir on Node v8.x.
Hi @thecodrr ! Now, with node 8.17.0 it works! Thank you for your help!
Wait, so it works on Node 8 but does not work on Node 12?
Yes @papb
System: Windows Server 2019 Version 1809 (Build 17763.737) Node.js Version: 12.18.2 fdir Version: 3.4.3
In my project, I have a OneDrive sync, mapped as Network drive. When i run fdir on this, I only get the files in the root directory of the Network Drive. But, when i map another folder as network drive, with the same code, fdir outputs all dirs and files, as it should.
My Code:
Screenshot of the execution in Drive R:\ :
Screenshot of the execution in Drive S:\ :
Do you have an idea of a fix for the issue? How can i debug fdir? How can i see errors?