diff options
Diffstat (limited to 'src/cstore/unionfs/cstore-unionfs.cpp')
-rw-r--r-- | src/cstore/unionfs/cstore-unionfs.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/cstore/unionfs/cstore-unionfs.cpp b/src/cstore/unionfs/cstore-unionfs.cpp index 849d659..eebabfe 100644 --- a/src/cstore/unionfs/cstore-unionfs.cpp +++ b/src/cstore/unionfs/cstore-unionfs.cpp @@ -755,9 +755,15 @@ bool UnionfsCstore::mark_changed_with_ancestors() { b_fs::path opath = mutable_cfg_path; // use a copy - while (opath.has_parent_path()) { - b_fs::path marker = (work_root / opath); - pop_path(opath); + bool done = false; + while (!done) { + b_fs::path marker = work_root; + if (opath.has_parent_path()) { + marker /= opath; + pop_path(opath); + } else { + done = true; + } if (!b_fs_exists(marker) || !b_fs_is_directory(marker)) { // don't do anything if the node is not there continue; |