mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-11-29 12:03:59 +08:00
fuse_getattr.cpp
This commit is contained in:
parent
f2c8265c8e
commit
a87b8fdb4b
|
@ -153,28 +153,7 @@ namespace l
|
|||
|
||||
fullpath = fs::path::make(i->second,fusepath_);
|
||||
|
||||
switch(followsymlinks_)
|
||||
{
|
||||
case FollowSymlinks::ENUM::NEVER:
|
||||
rv = fs::lstat(fullpath,st_);
|
||||
break;
|
||||
case FollowSymlinks::ENUM::DIRECTORY:
|
||||
rv = fs::lstat(fullpath,st_);
|
||||
if(S_ISLNK(st_->st_mode))
|
||||
l::set_stat_if_leads_to_dir(fullpath,st_);
|
||||
break;
|
||||
case FollowSymlinks::ENUM::REGULAR:
|
||||
rv = fs::lstat(fullpath,st_);
|
||||
if(S_ISLNK(st_->st_mode))
|
||||
l::set_stat_if_leads_to_reg(fullpath,st_);
|
||||
break;
|
||||
case FollowSymlinks::ENUM::ALL:
|
||||
rv = fs::stat(fullpath,st_);
|
||||
if(rv != 0)
|
||||
rv = fs::lstat(fullpath,st_);
|
||||
break;
|
||||
}
|
||||
|
||||
rv = l::getattr(fullpath,followsymlinks_,st_);
|
||||
if(rv == -1)
|
||||
{
|
||||
cache.erase(fusepath_);
|
||||
|
|
Loading…
Reference in New Issue
Block a user