Warn about Controlled folder access on Windows

Controlled folder access blocks access to Documents folder which we use.


(cherry picked from commit aa6fb159b5)

Co-authored-by: Alex Shvartzkop <[email protected]>
This commit is contained in:
dsa-t
2025-11-29 19:38:17 +03:00
parent 0ab118566b
commit c71c6cb724
+20
View File
@@ -22,6 +22,7 @@
#include <wx/stdpaths.h>
#include <wx/string.h>
#include <wx/utils.h>
#include <wx/msgdlg.h>
#include <kiplatform/environment.h>
#include <paths.h>
@@ -512,6 +513,25 @@ void PATHS::EnsureUserPathsExist()
EnsurePathExists( GetDefaultUserFootprintsPath() );
EnsurePathExists( GetDefaultUser3DModelsPath() );
EnsurePathExists( GetDefault3rdPartyPath() );
#ifdef _WIN32
// Warn about Controlled folder access
wxFileName tmp;
getUserDocumentPath( tmp );
if( !tmp.DirExists() )
{
wxString msg = wxString::Format(
_( "KiCad was unable to use '%s'.\n"
"\n"
"1. Disable 'Controlled folder access' in Windows settings or Group Policy\n"
"2. Make sure no other antivirus software interferes with KiCad\n"
"3. Make sure you have correct permissions set up" ),
tmp.GetPath() );
wxMessageBox( msg, _( "Warning" ), wxICON_WARNING );
}
#endif
}