mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-30 11:56:31 -05:00
NFS open/creat hack
A hack to work around non-POSIX NFS <-> FUSE behavior where it turns an open(O_EXCL|O_CREAT,0444) into multiple calls that results in EACCES.
This commit is contained in:
parent
5a0568495b
commit
93218a343a
12 changed files with 280 additions and 18 deletions
|
|
@ -48,6 +48,23 @@ namespace fs
|
|||
base += suffix;
|
||||
}
|
||||
|
||||
static
|
||||
inline
|
||||
string
|
||||
make(const char *base_,
|
||||
const char *suffix_)
|
||||
{
|
||||
char back;
|
||||
string path(base_);
|
||||
|
||||
back = *path.rbegin();
|
||||
if((back != '/') && (suffix_[0] != '/'))
|
||||
path.push_back('/');
|
||||
path += suffix_;
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
static
|
||||
inline
|
||||
string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue