зеркало из https://github.com/microsoft/BuildXL.git
Merged PR 672070: Reuse get_mode
This commit is contained in:
Родитель
00c7a87c3f
Коммит
7a24e94bee
|
@ -334,12 +334,8 @@ AccessCheckResult BxlObserver::report_access_at(const char *syscallName, es_even
|
|||
|
||||
AccessCheckResult BxlObserver::report_firstAllowWriteCheck(const char *fullPath)
|
||||
{
|
||||
|
||||
struct stat buffer;
|
||||
DWORD error = errno;
|
||||
// Check the path exists as file
|
||||
bool fileExists = real___lxstat(1, fullPath, &buffer) == 0 && !S_ISDIR(buffer.st_mode);
|
||||
errno = error;
|
||||
mode_t mode = get_mode(fullPath);
|
||||
bool fileExists = mode != 0 && !S_ISDIR(mode);
|
||||
|
||||
AccessReport report =
|
||||
{
|
||||
|
|
|
@ -334,10 +334,13 @@ public:
|
|||
|
||||
mode_t get_mode(const char *path)
|
||||
{
|
||||
int old = errno;
|
||||
struct stat buf;
|
||||
return real___lxstat(1, path, &buf) == 0
|
||||
mode_t result = real___lxstat(1, path, &buf) == 0
|
||||
? buf.st_mode
|
||||
: 0;
|
||||
errno = old;
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string normalize_path(const char *pathname, int oflags = 0)
|
||||
|
|
|
@ -4605,7 +4605,7 @@
|
|||
"Type": "NuGet",
|
||||
"NuGet": {
|
||||
"Name": "runtime.linux-x64.BuildXL",
|
||||
"Version": "0.1.0-20220726.12"
|
||||
"Version": "0.1.0-20220726.16"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -413,7 +413,7 @@ config({
|
|||
// Runtime dependencies for Linux
|
||||
{
|
||||
id: "runtime.linux-x64.BuildXL",
|
||||
version: "0.1.0-20220726.12",
|
||||
version: "0.1.0-20220726.16",
|
||||
osSkip: importFile(f`config.microsoftInternal.dsc`).isMicrosoftInternal
|
||||
? []
|
||||
: [ "win", "macOS", "unix" ]
|
||||
|
|
Загрузка…
Ссылка в новой задаче