diff options
author | nalpp <nalpp@yandex-team.ru> | 2022-02-10 16:46:45 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:45 +0300 |
commit | 87f3eb38999df2d3c1cb77f8ffb9c52ec9c516fb (patch) | |
tree | f4ab0734eecf35b22f21952d1aa15496f267a6a3 /util/system/fs.cpp | |
parent | 198698b9c1e18958addc9682fbfba4576d604757 (diff) | |
download | ydb-87f3eb38999df2d3c1cb77f8ffb9c52ec9c516fb.tar.gz |
Restoring authorship annotation for <nalpp@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/fs.cpp')
-rw-r--r-- | util/system/fs.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/system/fs.cpp b/util/system/fs.cpp index d2611a8ccc..01ad2bb9b5 100644 --- a/util/system/fs.cpp +++ b/util/system/fs.cpp @@ -71,16 +71,16 @@ bool NFs::MakeDirectoryRecursive(const TString& path, EFilePermissions mode, boo return true; } else { //NOTE: recursion is finite due to existence of "." and "/" - if (!NFs::MakeDirectoryRecursive(TFsPath(path).Parent(), mode, false)) { - return false; - } - - bool isDirMade = NFs::MakeDirectory(path, mode); - if (!isDirMade && alwaysCreate) { + if (!NFs::MakeDirectoryRecursive(TFsPath(path).Parent(), mode, false)) { + return false; + } + + bool isDirMade = NFs::MakeDirectory(path, mode); + if (!isDirMade && alwaysCreate) { ythrow TIoException() << "failed to create " << path << " with cwd (" << NFs::CurrentWorkingDirectory() << ")"; } - - return TFileStat(path).IsDir(); + + return TFileStat(path).IsDir(); } } |