mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
stop auto calculating and storing fullpath in policies
This commit is contained in:
parent
0c60701b29
commit
b2cd79154a
37 changed files with 278 additions and 259 deletions
|
|
@ -49,9 +49,9 @@ _symlink(Policy::Func::Create createFunc,
|
|||
int rv;
|
||||
int error;
|
||||
string newpathdir;
|
||||
Paths newpathdirs;
|
||||
vector<string> newpathdirs;
|
||||
|
||||
newpathdir = fs::dirname(newpath);
|
||||
newpathdir = fs::path::dirname(newpath);
|
||||
rv = createFunc(srcmounts,newpathdir,minfreespace,newpathdirs);
|
||||
if(rv == -1)
|
||||
return -errno;
|
||||
|
|
@ -59,9 +59,9 @@ _symlink(Policy::Func::Create createFunc,
|
|||
error = 0;
|
||||
for(size_t i = 0, ei = newpathdirs.size(); i != ei; i++)
|
||||
{
|
||||
newpathdirs[i].full = fs::make_path(newpathdirs[i].base,newpath);
|
||||
fs::path::append(newpathdirs[i],newpath);
|
||||
|
||||
rv = symlink(oldpath.c_str(),newpathdirs[i].full.c_str());
|
||||
rv = symlink(oldpath.c_str(),newpathdirs[i].c_str());
|
||||
if(rv == -1)
|
||||
error = errno;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue