Skip to content

Commit

Permalink
Merge pull request containers#166 from giuseppe/composefs-from-json-s…
Browse files Browse the repository at this point in the history
…kip-empty

composefs-from-json: skip empty dir components
  • Loading branch information
cgwalters authored Jul 5, 2023
2 parents ac729b5 + 51e643d commit 1704f82
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/composefs-from-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,9 @@ static struct lcfs_node_s *get_or_add_node(const char *typ,
while ((it = strsep(&dpath, "/"))) {
struct lcfs_node_s *c;

if (it[0] == '\0')
continue;

c = lcfs_node_lookup_child(node, it);
if (c) {
node = c;
Expand Down

0 comments on commit 1704f82

Please sign in to comment.