Commit 78c91e9e authored by Max Kellermann's avatar Max Kellermann

test/run_storage: don't print unknown time stamps

parent 44493ca0
......@@ -67,8 +67,13 @@ Ls(Storage &storage, const char *path)
break;
}
char mtime[32];
strftime(mtime, sizeof(mtime), "%F", gmtime(&info.mtime));
char mtime_buffer[32];
const char *mtime = " ";
if (info.mtime > 0) {
strftime(mtime_buffer, sizeof(mtime_buffer), "%F",
gmtime(&info.mtime));
mtime = mtime_buffer;
}
printf("%s %10llu %s %s\n",
type, (unsigned long long)info.size,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment