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:
Antonio SJ Musumeci 2020-07-16 15:31:50 -04:00
parent 5a0568495b
commit 93218a343a
12 changed files with 280 additions and 18 deletions

View file

@ -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