summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorleo-arch <leonardoabramovich2@gmail.com>2022-07-25 20:31:13 -0300
committerleo-arch <leonardoabramovich2@gmail.com>2022-07-25 20:31:13 -0300
commit5e0e27c1259ef86243860ebd7276c1a9e6d82665 (patch)
tree0df8d7625783027de3f874fef7a3469f0a41059a
parent029e9e0ee4ca02ef56dd7ba89c1e22ea7be18abf (diff)
Fix change time when no time is available
-rw-r--r--src/properties.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/properties.c b/src/properties.c
index 7f929cb9..44910af9 100644
--- a/src/properties.c
+++ b/src/properties.c
@@ -326,7 +326,7 @@ get_properties(char *filename, const int dsize)
/* Stat information */
#define MAX_TIME_STR 128
/* Our resulting time string won't go usually beyond 27 chars. But since this length
- * is locale dependent (at some point), let's use a much larger buffer size */
+ * is locale dependent (at least %b), let's use a much larger buffer size */
/* Last modification time */
time_t time = (time_t)attr.st_mtime;
@@ -361,7 +361,7 @@ get_properties(char *filename, const int dsize)
strftime(change_time, sizeof(change_time), "%b %d %H:%M:%S %Y %z", &tm);
} else {
*change_time = '-';
- change_time[0] = '\0';
+ change_time[1] = '\0';
}
/* Creation (birth) time */