summaryrefslogtreecommitdiffstats
path: root/usr.sbin/makefs/ffs.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/makefs/ffs.c')
-rw-r--r--usr.sbin/makefs/ffs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c
index cdbd2c3..13f00cf 100644
--- a/usr.sbin/makefs/ffs.c
+++ b/usr.sbin/makefs/ffs.c
@@ -780,8 +780,8 @@ ffs_populate_dir(const char *dir, fsnode *root, fsinfo_t *fsopts)
cur->inode->flags |= FI_WRITTEN;
if (cur->contents == NULL) {
- if (snprintf(path, sizeof(path), "%s/%s", dir,
- cur->name) >= sizeof(path))
+ if (snprintf(path, sizeof(path), "%s/%s/%s", cur->root,
+ cur->path, cur->name) >= (int)sizeof(path))
errx(1, "Pathname too long.");
}
OpenPOWER on IntegriCloud