aboutsummaryrefslogtreecommitdiffstats
path: root/util/folder/dirut.cpp
diff options
context:
space:
mode:
authoriddqd <iddqd@yandex-team.ru>2022-02-10 16:49:45 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:45 +0300
commit07fce9c5f7771600d0b3d70e1f88fd8a7e164d85 (patch)
treee4aa4750fbb864d70f8c06cf03d2750e979ea3bf /util/folder/dirut.cpp
parentaf42068bf6cd93c976b80dd0388fa48cdf65da11 (diff)
downloadydb-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.cpp26
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);