Skip to content
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

Util.getWinDirs triggers an antivirus #28

Open
rivashin opened this issue Jan 18, 2020 · 2 comments
Open

Util.getWinDirs triggers an antivirus #28

rivashin opened this issue Jan 18, 2020 · 2 comments

Comments

@rivashin
Copy link

rivashin commented Jan 18, 2020

OS: Windows 10

A java program calling Util.getWinDirs() triggers an antivirus scan on my laptop (Avecto Defendpoint) and takes almost 2 minutes to complete.
E.g this class:

public class A {
  public static void main(String[] a) throws Exception {
    System.out.println("Hello! " + new java.util.Date());
    io.github.soc.directories.ProjectDirectories.from("crash", "boom", "bang");
    System.out.println("Bye! " + new java.util.Date());
  }
}

prints

Hello! Sat Jan 18 21:30:56 GMT 2020
Bye! Sat Jan 18 21:32:40 GMT 2020

Interestingly, if I save the powershell script that ProjectDirectories use into a file a.ps1 and run it like this: powershell -File a.ps1 then it completes in a couple of seconds.

@alexarchambault
Copy link
Contributor

alexarchambault commented Feb 9, 2020

Don't know if -NoProfile can help here…

@DamianReeves
Copy link

Not using -Noprofile actually causes this call to fail for me as my profile loads things that output values that interfere with the proper execution of the script. I think all invocations of powershell like this should use -NoProfile as pointed out by @alexarchambault .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants