fix: initialize EXDEV rename staging for root sources

This commit is contained in:
Antonio SJ Musumeci 2026-10-28 12:12:26 -05:00 • committed by trapexit
parent 3d81e24f32
commit 7b7e96bbc5
3 changed files with 15 additions and 7 deletions

View file

@ -220,12 +220,11 @@ _rename_exdev_rename_target(const Policy::Action &actionPolicy_,
clonedst = branch->path;
clonedst /= ".mergerfs_rename_exdev";
rv = fs::mkdir_as({0,0},clonedst,01777);
if((rv < 0) && (rv != -EEXIST))
goto error;
rv = fs::clonepath(clonesrc,clonedst,oldfusepath_.parent_path());
if(rv == -ENOENT)
{
fs::mkdir_as({0,0},clonedst,01777);
rv = fs::clonepath(clonesrc,clonedst,oldfusepath_.parent_path());
}
if(rv < 0)
goto error;