mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-03-09 18:08:53 -04:00
Needed to make %G output "DEFAULT" when gid == GID_NONE.
This commit is contained in:
16
log.c
16
log.c
@@ -453,10 +453,14 @@ static void log_formatted(enum logcode code, char *format, char *op,
|
||||
n = buf2;
|
||||
break;
|
||||
case 'G':
|
||||
strlcat(fmt, "d", sizeof fmt);
|
||||
snprintf(buf2, sizeof buf2, fmt,
|
||||
(long)file->gid);
|
||||
n = buf2;
|
||||
if (file->gid == GID_NONE)
|
||||
n = "DEFAULT";
|
||||
else {
|
||||
strlcat(fmt, "ld", sizeof fmt);
|
||||
snprintf(buf2, sizeof buf2, fmt,
|
||||
(long)file->gid);
|
||||
n = buf2;
|
||||
}
|
||||
break;
|
||||
case 'p':
|
||||
strlcat(fmt, "ld", sizeof fmt);
|
||||
@@ -467,8 +471,8 @@ static void log_formatted(enum logcode code, char *format, char *op,
|
||||
case 'M':
|
||||
n = timestring(file->modtime);
|
||||
{
|
||||
char *cp;
|
||||
while ((cp = strchr(n, ' ')) != NULL)
|
||||
char *cp = n;
|
||||
while ((cp = strchr(cp, ' ')) != NULL)
|
||||
*cp = '-';
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user