Made the new %M escape handle multiple spaces in the timestamp
authorWayne Davison <wayned@samba.org>
Fri, 3 Feb 2006 22:41:19 +0000 (22:41 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 3 Feb 2006 22:41:19 +0000 (22:41 +0000)
(which can occur if the user's system doesn't have strftime()).

log.c

diff --git a/log.c b/log.c
index 4f531078b008d951a7eb54687ca770dd98b3d741..dad939b10f3ce9db5883f800e3647a86c6cc5460 100644 (file)
--- a/log.c
+++ b/log.c
@@ -467,8 +467,8 @@ static void log_formatted(enum logcode code, char *format, char *op,
                case 'M':
                        n = timestring(file->modtime);
                        {
-                               char *cp = strchr(n, ' ');
-                               if (cp)
+                               char *cp;
+                               while ((cp = strchr(n, ' ')) != NULL)
                                        *cp = '-';
                        }
                        break;