Better packed test

This commit is contained in:
Sergey Lyubka committed 2021-07-30 13:19:20 +01:00
1 parent 2af5d07467
commit 3a46055e52
14 files changed
+161 -80

No files matched your search

+1 -1
View File
@@ -596,7 +596,7 @@ static void printdirentry(const char *name, void *userdata) {
char path[MG_PATH_MAX], sz[64], mod[64];
int flags, n = 0;
if (snprintf(path, sizeof(path), "%s%c%s", d->dir, MG_DIRSEP, name) < 0) {
if (snprintf(path, sizeof(path), "%s%c%s", d->dir, '/', name) < 0) {
LOG(LL_ERROR, ("%s truncated", name));
} else if ((flags = fs->stat(path, &size, &mtime)) == 0) {
LOG(LL_ERROR, ("%lu stat(%s): %d", d->c->id, path, errno));