mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-21 07:26:28 -05:00
Remove 'all' policy and simplify logic
This commit is contained in:
parent
1f61a662ad
commit
b411c63df1
26 changed files with 178 additions and 285 deletions
|
|
@ -44,15 +44,15 @@ _symlink(const vector<string> &srcmounts,
|
|||
const string &to)
|
||||
{
|
||||
int rv;
|
||||
fs::PathVector paths;
|
||||
fs::Path path;
|
||||
|
||||
fs::find::ff(srcmounts,fs::dirname(to),paths);
|
||||
if(paths.empty())
|
||||
return -ENOENT;
|
||||
rv = fs::find::ff(srcmounts,fs::dirname(to),path);
|
||||
if(rv == -1)
|
||||
return -errno;
|
||||
|
||||
paths[0].full = fs::make_path(paths[0].base,to);
|
||||
path.full = fs::make_path(path.base,to);
|
||||
|
||||
rv = symlink(from.c_str(),paths[0].full.c_str());
|
||||
rv = symlink(from.c_str(),path.full.c_str());
|
||||
|
||||
return ((rv == -1) ? -errno : 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue