mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-19 22:46:34 -05:00
add tagging branches RW/RO/NW
This allows users to tag a branch as readonly or not for writing regardless of how the filesystem is mounted. Should simplify deployments and offer more flexibility.
This commit is contained in:
parent
8dd0dc11ee
commit
b55ebba4ed
57 changed files with 1586 additions and 1210 deletions
|
|
@ -27,25 +27,16 @@ using std::vector;
|
|||
namespace fs
|
||||
{
|
||||
void
|
||||
glob(const vector<string> &patterns_,
|
||||
vector<string> &strs_)
|
||||
glob(const string &pattern_,
|
||||
vector<string> &strs_)
|
||||
{
|
||||
int flags;
|
||||
size_t veclen;
|
||||
glob_t gbuf = {0};
|
||||
|
||||
veclen = patterns_.size();
|
||||
if(veclen == 0)
|
||||
return;
|
||||
|
||||
flags = GLOB_NOCHECK;
|
||||
::glob(patterns_[0].c_str(),flags,NULL,&gbuf);
|
||||
::glob(pattern_.c_str(),flags,NULL,&gbuf);
|
||||
|
||||
flags = GLOB_APPEND|GLOB_NOCHECK;
|
||||
for(size_t i = 1; i < veclen; i++)
|
||||
::glob(patterns_[i].c_str(),flags,NULL,&gbuf);
|
||||
|
||||
for(size_t i = 0; i < gbuf.gl_pathc; ++i)
|
||||
for(size_t i = 0; i < gbuf.gl_pathc; i++)
|
||||
strs_.push_back(gbuf.gl_pathv[i]);
|
||||
|
||||
::globfree(&gbuf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue