aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/fs.cpp
diff options
context:
space:
mode:
authornalpp <nalpp@yandex-team.ru>2022-02-10 16:46:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:46 +0300
commit30d1ef3941e0dc835be7609de5ebee66958f215a (patch)
tree49e222ea1c5804306084bb3ae065bb702625360f /util/system/fs.cpp
parent87f3eb38999df2d3c1cb77f8ffb9c52ec9c516fb (diff)
downloadydb-30d1ef3941e0dc835be7609de5ebee66958f215a.tar.gz
Restoring authorship annotation for <nalpp@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/fs.cpp')
-rw-r--r--util/system/fs.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/system/fs.cpp b/util/system/fs.cpp
index 01ad2bb9b5..d2611a8ccc 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();
}
}