mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-25 17:36:25 -05:00
simplify policies
This commit is contained in:
parent
fc100006f9
commit
b3248a8f78
18 changed files with 167 additions and 269 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include <algorithm>
|
||||
|
||||
#include "policy.hpp"
|
||||
#include "success_fail.hpp"
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
|
@ -38,11 +39,9 @@ namespace mergerfs
|
|||
int rv;
|
||||
|
||||
rv = Policy::Func::all(type,basepaths,fusepath,minfreespace,paths);
|
||||
if(rv == -1)
|
||||
return -1;
|
||||
if(POLICY_SUCCEEDED(rv))
|
||||
std::random_shuffle(paths.begin(),paths.end());
|
||||
|
||||
std::random_shuffle(paths.begin(),paths.end());
|
||||
|
||||
return 0;
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue