diff options
author | snowball <snowball@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:32 +0300 |
commit | 83a8efcf3af051e3dd59c00d1d5dafc96412ec1e (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/system/fstat.cpp | |
parent | 4d57126b1bae3cfd0f4f95c32d1a85ca684ee92c (diff) | |
download | ydb-83a8efcf3af051e3dd59c00d1d5dafc96412ec1e.tar.gz |
Restoring authorship annotation for <snowball@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/fstat.cpp')
-rw-r--r-- | util/system/fstat.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/system/fstat.cpp b/util/system/fstat.cpp index ea87835fc7..81e98cbc6b 100644 --- a/util/system/fstat.cpp +++ b/util/system/fstat.cpp @@ -15,7 +15,7 @@ #endif #define _S_IFLNK 0x80000000 -ui32 GetFileMode(DWORD fileAttributes) { +ui32 GetFileMode(DWORD fileAttributes) { ui32 mode = 0; if (fileAttributes == 0xFFFFFFFF) return mode; @@ -23,14 +23,14 @@ ui32 GetFileMode(DWORD fileAttributes) { mode |= _S_IFCHR; if (fileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) mode |= _S_IFLNK; // todo: was undefined by the moment of writing this code - if (fileAttributes & FILE_ATTRIBUTE_DIRECTORY) + if (fileAttributes & FILE_ATTRIBUTE_DIRECTORY) mode |= _S_IFDIR; if (fileAttributes & (FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_ARCHIVE)) mode |= _S_IFREG; if ((fileAttributes & FILE_ATTRIBUTE_READONLY) == 0) mode |= _S_IWRITE; return mode; -} +} #define S_ISDIR(st_mode) (st_mode & _S_IFDIR) #define S_ISREG(st_mode) (st_mode & _S_IFREG) @@ -42,8 +42,8 @@ using TSystemFStat = BY_HANDLE_FILE_INFORMATION; using TSystemFStat = struct stat; -#endif - +#endif + static void MakeStat(TFileStat& st, const TSystemFStat& fs) { #ifdef _unix_ st.Mode = fs.st_mode; |