mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-20 15:06:33 -05:00
Misc cleanup (#1486)
* Skip non-directories when loading branches * Warn if branch doesn't exist * Add braces to globbing
This commit is contained in:
parent
be49dbe1bd
commit
264c5600f8
3 changed files with 94 additions and 173 deletions
|
|
@ -23,6 +23,13 @@
|
|||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
#ifndef GLOB_BRACE
|
||||
#define GLOB_BRACE 0
|
||||
#endif
|
||||
|
||||
#ifndef GLOB_ONLYDIR
|
||||
#define GLOB_ONLYDIR 0
|
||||
#endif
|
||||
|
||||
namespace fs
|
||||
{
|
||||
|
|
@ -33,7 +40,7 @@ namespace fs
|
|||
int flags;
|
||||
glob_t gbuf = {0};
|
||||
|
||||
flags = GLOB_NOCHECK;
|
||||
flags = (GLOB_BRACE|GLOB_ONLYDIR);
|
||||
::glob(pattern_.c_str(),flags,NULL,&gbuf);
|
||||
|
||||
for(size_t i = 0; i < gbuf.gl_pathc; i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue