MCPcopy Create free account
hub / github.com/Windscribe/Desktop-App / isSystemProtected

Function isSystemProtected

src/installer/gui/windows/utils/path.cpp:83–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83bool isSystemProtected(const wstring &dir)
84{
85 // We're not doing any actual 'system protected' checks here. The user should be installing
86 // to 'Program Files'. Any other system-protected location is an anti-pattern.
87
88 // make_preferred to normalize the path separator.
89 filesystem::path fsDir(dir);
90 const auto targetDir = removeSeparator(fsDir.make_preferred());
91 const auto programFiles = Utils::programFilesFolder();
92 return ::PathIsPrefix(programFiles.c_str(), dir.c_str());
93}
94
95}

Callers 1

isWarnUserCustomPathMethod · 0.85

Calls 2

removeSeparatorFunction · 0.85
programFilesFolderFunction · 0.85

Tested by

no test coverage detected