-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scanDir do not return an array of files #87
Comments
Please refer to the docs: https://github.com/kylefarris/clamscan#note Relevant passage:
|
Hi, Here my code:
and the result is :
files directory is : |
You would need to set |
Thank you for your answser. When I set scanRecursively to true, I get this error:
|
That can't be the entire error. That's just the stacktrace showing where the error was thrown. I'd need to know what error was actually thrown here as the could be any number of things. |
Hi, I restarted eveything from scratch: my code:
My directory : And the result:
And when I put breakpoints in callback functions, I never reach it. I also tried the promise syntaxe and stay stuck in it. I got the same result and never reach the next line.
I'm sorry if this thread has changed since the start. If you want I can open a new one. |
My analyse is : Scandir return a promise that make a "return scanfile(...)" and scanfile return a promise (line 1978) line 1978 : IMO, it should be replaced by something like this:
|
That's more like it. Yeah, from looking at your debug log, it all looks like it's working up to a point. I haven't had a chance to look at the source code yet but your analysis seems correct in theory. Why don't you see if you can fix the issue and run some tests? A PR would be really help since I'm quite busy this week. Thanks for all your hard work. |
ok, I'll try ! |
FTR, this issue was fixed in v2.1.1. |
The result of doesn't return arrays of good files and bad files.
It returns an array with the path scanned.
The text was updated successfully, but these errors were encountered: