diff options
author | iddqd <iddqd@yandex-team.ru> | 2022-02-10 16:49:45 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:45 +0300 |
commit | 07fce9c5f7771600d0b3d70e1f88fd8a7e164d85 (patch) | |
tree | e4aa4750fbb864d70f8c06cf03d2750e979ea3bf /util/folder/dirut.cpp | |
parent | af42068bf6cd93c976b80dd0388fa48cdf65da11 (diff) | |
download | ydb-07fce9c5f7771600d0b3d70e1f88fd8a7e164d85.tar.gz |
Restoring authorship annotation for <iddqd@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/folder/dirut.cpp')
-rw-r--r-- | util/folder/dirut.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/util/folder/dirut.cpp b/util/folder/dirut.cpp index ffc9b09f96..8922884136 100644 --- a/util/folder/dirut.cpp +++ b/util/folder/dirut.cpp @@ -222,22 +222,22 @@ int correctpath(char* cpath, const char* path) { } char* ptr = (char*)path; char* cptr = cpath; - int counter = 0; - while (*ptr) { - char c = *ptr; - if (c == '/') - c = '\\'; - if (c == '\\') + int counter = 0; + while (*ptr) { + char c = *ptr; + if (c == '/') + c = '\\'; + if (c == '\\') ++counter; - else - counter = 0; - if (counter <= 1) { - *cptr = c; + else + counter = 0; + if (counter <= 1) { + *cptr = c; ++cptr; - } + } ++ptr; - } - *cptr = 0; + } + *cptr = 0; // replace '/' by '\' int dk = skip_disk(cpath); |