mirror of
https://github.com/troglobit/libite.git
synced 2026-11-29 20:58:25 +00:00
rsync(): Fix variable shadowing, found by clang-tidy
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
2a6adeebcd
commit
549f325c21
1 file changed
+4
-4
+4
-4
@@ -107,20 +107,20 @@ int rsync(char *src, char *dst, int opt, int (*filter)(const char *file))
|
|||||||
snprintf(source, sizeof(source), "%s%s%s", src, fisslashdir(src) ? "" : "/", files[i]);
|
snprintf(source, sizeof(source), "%s%s%s", src, fisslashdir(src) ? "" : "/", files[i]);
|
||||||
if (fisdir(source)) {
|
if (fisdir(source)) {
|
||||||
char dst2[256];
|
char dst2[256];
|
||||||
struct stat st;
|
struct stat sb;
|
||||||
|
|
||||||
strcat(source, "/");
|
strcat(source, "/");
|
||||||
if (stat(source, &st))
|
if (stat(source, &sb))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (mdir(dst2, sizeof(dst2), dst, files[i], &st)) {
|
if (mdir(dst2, sizeof(dst2), dst, files[i], &sb)) {
|
||||||
result++;
|
result++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
rsync(source, dst2, opt, filter);
|
rsync(source, dst2, opt, filter);
|
||||||
if (keep_mtim)
|
if (keep_mtim)
|
||||||
set_mtime(dst2, &st);
|
set_mtime(dst2, &sb);
|
||||||
|
|
||||||
continue; /* Next file/dir in @src to copy... */
|
continue; /* Next file/dir in @src to copy... */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user