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
|
|
@ -40,7 +40,7 @@ static
|
|||
int
|
||||
_newest(const vector<string> &basepaths,
|
||||
const string &fusepath,
|
||||
Paths &paths)
|
||||
vector<string> &paths)
|
||||
{
|
||||
time_t newest;
|
||||
const char *neweststr;
|
||||
|
|
@ -55,7 +55,7 @@ _newest(const vector<string> &basepaths,
|
|||
string fullpath;
|
||||
|
||||
basepath = basepaths[i].c_str();
|
||||
fullpath = fs::make_path(basepath,fusepath);
|
||||
fullpath = fs::path::make(basepath,fusepath);
|
||||
|
||||
rv = ::lstat(fullpath.c_str(),&st);
|
||||
if(rv == 0 && st.st_mtime > newest)
|
||||
|
|
@ -68,8 +68,7 @@ _newest(const vector<string> &basepaths,
|
|||
if(neweststr == NULL)
|
||||
return (errno=ENOENT,-1);
|
||||
|
||||
paths.push_back(Path(neweststr,
|
||||
fs::make_path(neweststr,fusepath)));
|
||||
paths.push_back(neweststr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -81,7 +80,7 @@ namespace mergerfs
|
|||
const vector<string> &basepaths,
|
||||
const string &fusepath,
|
||||
const size_t minfreespace,
|
||||
Paths &paths)
|
||||
vector<string> &paths)
|
||||
{
|
||||
return _newest(basepaths,fusepath,paths);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue