aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/fs_win.cpp
diff options
context:
space:
mode:
authoryazevnul <yazevnul@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit8cbc307de0221f84c80c42dcbe07d40727537e2c (patch)
tree625d5a673015d1df891e051033e9fcde5c7be4e5 /util/system/fs_win.cpp
parent30d1ef3941e0dc835be7609de5ebee66958f215a (diff)
downloadydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/fs_win.cpp')
-rw-r--r--util/system/fs_win.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/system/fs_win.cpp b/util/system/fs_win.cpp
index a410ccac06..04adf6b3c1 100644
--- a/util/system/fs_win.cpp
+++ b/util/system/fs_win.cpp
@@ -13,7 +13,7 @@ namespace NFsPrivate {
wstr.resize(str.size());
size_t written = 0;
if (!UTF8ToWide(str.data(), str.size(), wstr.begin(), written))
- return nullptr;
+ return nullptr;
wstr.erase(written);
static_assert(sizeof(WCHAR) == sizeof(wchar16), "expect sizeof(WCHAR) == sizeof(wchar16)");
return (const WCHAR*)wstr.data();
@@ -25,7 +25,7 @@ namespace NFsPrivate {
return WideToUTF8((wchar16*)wstr, len);
}
- HANDLE CreateFileWithUtf8Name(const TStringBuf fName, ui32 accessMode, ui32 shareMode, ui32 createMode, ui32 attributes, bool inheritHandle) {
+ HANDLE CreateFileWithUtf8Name(const TStringBuf fName, ui32 accessMode, ui32 shareMode, ui32 createMode, ui32 attributes, bool inheritHandle) {
TUtf16String wstr;
LPCWSTR wname = UTF8ToWCHAR(fName, wstr);
if (!wname) {
@@ -34,9 +34,9 @@ namespace NFsPrivate {
}
SECURITY_ATTRIBUTES secAttrs;
secAttrs.bInheritHandle = inheritHandle ? TRUE : FALSE;
- secAttrs.lpSecurityDescriptor = nullptr;
+ secAttrs.lpSecurityDescriptor = nullptr;
secAttrs.nLength = sizeof(secAttrs);
- return ::CreateFileW(wname, accessMode, shareMode, &secAttrs, createMode, attributes, nullptr);
+ return ::CreateFileW(wname, accessMode, shareMode, &secAttrs, createMode, attributes, nullptr);
}
bool WinRename(const TString& oldPath, const TString& newPath) {
@@ -110,7 +110,7 @@ namespace NFsPrivate {
return false;
}
- return (CreateHardLinkW(npPtr, epPtr, nullptr) != 0);
+ return (CreateHardLinkW(npPtr, epPtr, nullptr) != 0);
}
bool WinExists(const TString& path) {
@@ -186,7 +186,7 @@ namespace NFsPrivate {
TTempBuf buf;
while (true) {
DWORD bytesReturned = 0;
- BOOL res = DeviceIoControl(h, FSCTL_GET_REPARSE_POINT, nullptr, 0, buf.Data(), buf.Size(), &bytesReturned, nullptr);
+ BOOL res = DeviceIoControl(h, FSCTL_GET_REPARSE_POINT, nullptr, 0, buf.Data(), buf.Size(), &bytesReturned, nullptr);
if (res) {
REPARSE_DATA_BUFFER* rdb = (REPARSE_DATA_BUFFER*)buf.Data();
if (rdb->ReparseTag == IO_REPARSE_TAG_SYMLINK) {
@@ -219,8 +219,8 @@ bool GetObjectId(const char* path, GUID* id) {
if (h.IsOpen()) {
FILE_OBJECTID_BUFFER fob;
DWORD resSize = 0;
- if (DeviceIoControl(h, FSCTL_CREATE_OR_GET_OBJECT_ID, nullptr, 0, &fob, sizeof(fob), &resSize, nullptr)) {
- Y_ASSERT(resSize == sizeof(fob));
+ if (DeviceIoControl(h, FSCTL_CREATE_OR_GET_OBJECT_ID, nullptr, 0, &fob, sizeof(fob), &resSize, nullptr)) {
+ Y_ASSERT(resSize == sizeof(fob));
memcpy(id, &fob.ObjectId, sizeof(GUID));
return true;
}