diff options
author | qwerty <qwerty@yandex-team.ru> | 2022-02-10 16:49:24 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:24 +0300 |
commit | 34e37ee57f5837a8da2fdfaccaac9bbe6c7f02ba (patch) | |
tree | c9e2dc7251a6743c4352ec4a4c717b18a1bd4da7 /util/folder | |
parent | 19bd45eb7775ffded0c62ab05d10b7326198aaa6 (diff) | |
download | ydb-34e37ee57f5837a8da2fdfaccaac9bbe6c7f02ba.tar.gz |
Restoring authorship annotation for <qwerty@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/folder')
-rw-r--r-- | util/folder/dirent_win.c | 4 | ||||
-rw-r--r-- | util/folder/filelist_ut.cpp | 2 | ||||
-rw-r--r-- | util/folder/lstat_win.c | 4 | ||||
-rw-r--r-- | util/folder/path.cpp | 2 | ||||
-rw-r--r-- | util/folder/path.h | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/util/folder/dirent_win.c b/util/folder/dirent_win.c index 7e6db74ce5..3e6f00a239 100644 --- a/util/folder/dirent_win.c +++ b/util/folder/dirent_win.c @@ -32,7 +32,7 @@ struct DIR* opendir(const char* dirname) { int len = strlen(dirname); //Remove trailing slashes while (len && (dirname[len - 1] == '\\' || dirname[len - 1] == '/')) { - --len; + --len; } int len_converted = MultiByteToWideChar(CP_UTF8, 0, dirname, len, 0, 0); if (len_converted == 0) { @@ -80,7 +80,7 @@ int readdir_r(struct DIR* dir, struct dirent* entry, struct dirent** result) { } entry->d_fileno = dir->file_no++; entry->d_reclen = sizeof(struct dirent); - if (dir->wfd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT && + if (dir->wfd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT && (dir->wfd.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT || dir->wfd.dwReserved0 == IO_REPARSE_TAG_SYMLINK)) { entry->d_type = DT_LNK; diff --git a/util/folder/filelist_ut.cpp b/util/folder/filelist_ut.cpp index 0cdcdf3d00..e5eb096c45 100644 --- a/util/folder/filelist_ut.cpp +++ b/util/folder/filelist_ut.cpp @@ -22,7 +22,7 @@ void TFileListTest::TestSimple() { TTempDir tempDir("nonexistingdir"); MakeDirIfNotExist((tempDir() + LOCSLASH_S "subdir").data()); TFile((tempDir() + LOCSLASH_S "subdir" LOCSLASH_S "file").data(), CreateAlways); - + TFileList fileList; fileList.Fill(tempDir().data(), "", "", 1000); TString fileName(fileList.Next()); diff --git a/util/folder/lstat_win.c b/util/folder/lstat_win.c index cf94cec01a..d5bb64ede4 100644 --- a/util/folder/lstat_win.c +++ b/util/folder/lstat_win.c @@ -3,7 +3,7 @@ #ifdef _win_ #include <util/system/winint.h> #include "lstat_win.h" - + int lstat(const char* fileName, stat_struct* fileStat) { int len = strlen(fileName); int convRes = MultiByteToWideChar(CP_UTF8, 0, fileName, len, 0, 0); @@ -21,7 +21,7 @@ int lstat(const char* fileName, stat_struct* fileStat) { if (result == 0) { SetLastError(0); findHandle = FindFirstFileW(buf, &findBuf); - if (findBuf.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT && + if (findBuf.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT && (findBuf.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT || findBuf.dwReserved0 == IO_REPARSE_TAG_SYMLINK)) { fileStat->st_mode = fileStat->st_mode & ~_S_IFMT | _S_IFLNK; diff --git a/util/folder/path.cpp b/util/folder/path.cpp index bfe0c67d68..96682b9cbd 100644 --- a/util/folder/path.cpp +++ b/util/folder/path.cpp @@ -70,7 +70,7 @@ TFsPath TFsPath::RelativeTo(const TFsPath& root) const { if (!this->IsSubpathOf(root)) { ythrow TIoException() << "path " << *this << " is not subpath of " << root; } - + split.erase(split.begin(), split.begin() + rsplit.size()); split.IsAbsolute = false; diff --git a/util/folder/path.h b/util/folder/path.h index 2fb4d6b4ef..ef78ffcfc0 100644 --- a/util/folder/path.h +++ b/util/folder/path.h @@ -87,7 +87,7 @@ public: bool IsAbsolute() const; bool IsRelative() const; - + /** * TFsPath("/a/b").IsSubpathOf("/a") -> true * @@ -125,7 +125,7 @@ public: * Never fails. Returns this if already a root. */ TFsPath Parent() const; - + TString Basename() const { return GetName(); } |