You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have developed a program using ProjFS to synchronize files between my backend and a Windows session. Everything works as expected within the projected filesystem: I can create, modify, delete, copy, and move files.
However, when I try to copy a file from outside the projected filesystem into it, Explorer.exe gets stuck during the copy process. I don’t receive any errors or logs from ProjFS, which makes it difficult to debug the issue.
Has anyone encountered this problem before or have suggestions on how to resolve it? I can share specific parts of the code if needed.
Thank you in advance for your help!
The text was updated successfully, but these errors were encountered:
I continued investigating the issue, and I found that the problem is caused by Microsoft Defender. During the file copy process, Defender performs a checksum (specifically, opening the file with ifstream), which blocks the file opening operation. As a result, my program was stuck on the following line: std::ifstream file(filePath, std::ios::binary);
To temporarily address the issue, I started by whitelisting my program's executable in Microsoft Defender. While this approach works, it is not feasible for production in the context of my project.
Instead, I added the following logic in my program during the OPEN event notification to prevent the antivirus from accessing the file:
if (CallbackData->TriggeringProcessImageFileName) {
if (EndsWithStringI(CallbackData->TriggeringProcessImageFileName, L"MsMpEng.exe")) {
return;
}
}
Although this fix works, it is not ideal or recommended. Does anyone have a better solution for handling this situation?
I have developed a program using ProjFS to synchronize files between my backend and a Windows session. Everything works as expected within the projected filesystem: I can create, modify, delete, copy, and move files.
However, when I try to copy a file from outside the projected filesystem into it, Explorer.exe gets stuck during the copy process. I don’t receive any errors or logs from ProjFS, which makes it difficult to debug the issue.
Has anyone encountered this problem before or have suggestions on how to resolve it? I can share specific parts of the code if needed.
Thank you in advance for your help!
The text was updated successfully, but these errors were encountered: