From 3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 7 Aug 2024 15:30:09 +0200 Subject: Merging upstream version 1.22.7. Signed-off-by: Daniel Baumann --- src/split/split.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/split/split.c') diff --git a/src/split/split.c b/src/split/split.c index 771de62..d218ab7 100644 --- a/src/split/split.c +++ b/src/split/split.c @@ -99,7 +99,9 @@ parse_timestamp(const char *value) errno = 0; timestamp = strtoimax(value, &end, 10); - if (value == end || *end || errno != 0) + if (value == end || *end) + ohshit(_("unable to parse timestamp '%.255s'"), value); + else if (errno != 0) ohshite(_("unable to parse timestamp '%.255s'"), value); return timestamp; @@ -162,7 +164,7 @@ mksplit(const char *file_src, const char *prefix, off_t maxpartsize, version = versiondescribe(&pkg->available.version, vdew_nonambig); timestamp_str = getenv("SOURCE_DATE_EPOCH"); - if (timestamp_str) + if (str_is_set(timestamp_str)) timestamp = parse_timestamp(timestamp_str); else timestamp = time(NULL); -- cgit v1.2.3