diff --git a/test/py/tests/fs_helper.py b/test/py/tests/fs_helper.py index e323a97b220..ee779474ce6 100644 --- a/test/py/tests/fs_helper.py +++ b/test/py/tests/fs_helper.py @@ -66,8 +66,9 @@ class FsHelper: """Make a new filesystem and copy in the files""" self.setup() self._do_cleanup = True + src_dir = self.srcdir if os.listdir(self.srcdir) else None self.fs_img = mk_fs(self.config, self.fs_type, self.size_mb << 20, - self.prefix, self.srcdir, quiet=self.quiet) + self.prefix, src_dir, quiet=self.quiet) def setup(self): """Set up the srcdir ready to receive files"""