aboutsummaryrefslogtreecommitdiff
path: root/mkfs
diff options
context:
space:
mode:
Diffstat (limited to 'mkfs')
-rw-r--r--mkfs/mkfs.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c
index 79dded9..8b8ecc3 100644
--- a/mkfs/mkfs.c
+++ b/mkfs/mkfs.c
@@ -68,11 +68,18 @@ static int pack_files(data_writer_t *data, fstree_t *fs, options_t *opt)
static int read_fstree(fstree_t *fs, options_t *opt)
{
+ unsigned int flags;
FILE *fp;
int ret;
- if (opt->infile == NULL)
- return fstree_from_dir(fs, opt->packdir, opt->keep_time);
+ if (opt->infile == NULL) {
+ flags = 0;
+
+ if (opt->keep_time)
+ flags |= DIR_SCAN_KEEP_TIME;
+
+ return fstree_from_dir(fs, opt->packdir, flags);
+ }
fp = fopen(opt->infile, "rb");
if (fp == NULL) {