Skip to content

Commit

Permalink
repart: Skip partition_populate_directory() if no sources are provided
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanDeMeyer committed Nov 10, 2022
1 parent b05fde7 commit ebfdd3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/partition/repart.c
Original file line number Diff line number Diff line change
Expand Up @@ -3568,7 +3568,7 @@ static int partition_populate_directory(Partition *p, char **ret_root, char **re
* tree beforehand where we merge all our inputs. We then use this merged source tree to create the
* read-only filesystem. */

if (!mkfs_supports_root_option(p->format)) {
if (!mkfs_supports_root_option(p->format) || (strv_isempty(p->copy_files) && strv_isempty(p->make_directories))) {
*ret_root = NULL;
*ret_tmp_root = NULL;
return 0;
Expand Down

0 comments on commit ebfdd3e

Please sign in to comment.