aboutsummaryrefslogtreecommitdiffstats
path: root/util/folder/dirut.cpp
diff options
context:
space:
mode:
authoriddqd <iddqd@yandex-team.ru>2022-02-10 16:49:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:46 +0300
commitff241e1daf76d79ed38015cdb76d55eb3a33ac27 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/folder/dirut.cpp
parent07fce9c5f7771600d0b3d70e1f88fd8a7e164d85 (diff)
downloadydb-ff241e1daf76d79ed38015cdb76d55eb3a33ac27.tar.gz
Restoring authorship annotation for <iddqd@yandex-team.ru>. Commit 2 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 8922884136..ffc9b09f96 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);