diff options
author | Nikita Slyusarev <nslus@yandex-team.com> | 2022-02-10 16:46:53 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:53 +0300 |
commit | 469afdc4e2587bf62ecdd096b75a0baa444c4012 (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /util/folder/dirut.cpp | |
parent | cd77cecfc03a3eaf87816af28a33067c4f0cdb59 (diff) | |
download | ydb-469afdc4e2587bf62ecdd096b75a0baa444c4012.tar.gz |
Restoring authorship annotation for Nikita Slyusarev <nslus@yandex-team.com>. Commit 2 of 2.
Diffstat (limited to 'util/folder/dirut.cpp')
-rw-r--r-- | util/folder/dirut.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/util/folder/dirut.cpp b/util/folder/dirut.cpp index 793a95545b..ffc9b09f96 100644 --- a/util/folder/dirut.cpp +++ b/util/folder/dirut.cpp @@ -563,7 +563,7 @@ int ResolvePath(const char* rel, const char* abs, char res[/*MAXPATHLEN*/], bool *res = 0; if (!rel || !*rel) return EINVAL; - if (!IsAbsolutePath(rel) && IsAbsolutePath(abs)) { + if (!IsAbsolutePath(rel) && IsAbsolutePath(abs)) { len = strlcpy(t, abs, sizeof(t)); if (len >= sizeof(t) - 3) return EINVAL; @@ -581,13 +581,13 @@ int ResolvePath(const char* rel, const char* abs, char res[/*MAXPATHLEN*/], bool } if (!realpath(t, res)) { if (!isdir && realpath(GetDirName(t).data(), res)) { - len = strlen(res); - if (res[len - 1] != LOCSLASH_C) { - res[len++] = LOCSLASH_C; - res[len] = 0; + len = strlen(res); + if (res[len - 1] != LOCSLASH_C) { + res[len++] = LOCSLASH_C; + res[len] = 0; } strcpy(res + len, GetBaseName(t).data()); - return 0; + return 0; } return errno ? errno : ENOENT; } |