|
@ -103,22 +103,22 @@ namespace l |
|
|
switch(followsymlinks_) |
|
|
switch(followsymlinks_) |
|
|
{ |
|
|
{ |
|
|
case FollowSymlinks::ENUM::NEVER: |
|
|
case FollowSymlinks::ENUM::NEVER: |
|
|
rv = fs::lstat(fullpath,st_); |
|
|
|
|
|
|
|
|
rv = fs::lstat(fullpath_,st_); |
|
|
break; |
|
|
break; |
|
|
case FollowSymlinks::ENUM::DIRECTORY: |
|
|
case FollowSymlinks::ENUM::DIRECTORY: |
|
|
rv = fs::lstat(fullpath,st_); |
|
|
|
|
|
|
|
|
rv = fs::lstat(fullpath_,st_); |
|
|
if(S_ISLNK(st_->st_mode)) |
|
|
if(S_ISLNK(st_->st_mode)) |
|
|
l::set_stat_if_leads_to_dir(fullpath,st_); |
|
|
|
|
|
|
|
|
l::set_stat_if_leads_to_dir(fullpath_,st_); |
|
|
break; |
|
|
break; |
|
|
case FollowSymlinks::ENUM::REGULAR: |
|
|
case FollowSymlinks::ENUM::REGULAR: |
|
|
rv = fs::lstat(fullpath,st_); |
|
|
|
|
|
|
|
|
rv = fs::lstat(fullpath_,st_); |
|
|
if(S_ISLNK(st_->st_mode)) |
|
|
if(S_ISLNK(st_->st_mode)) |
|
|
l::set_stat_if_leads_to_reg(fullpath,st_); |
|
|
|
|
|
|
|
|
l::set_stat_if_leads_to_reg(fullpath_,st_); |
|
|
break; |
|
|
break; |
|
|
case FollowSymlinks::ENUM::ALL: |
|
|
case FollowSymlinks::ENUM::ALL: |
|
|
rv = fs::stat(fullpath,st_); |
|
|
|
|
|
|
|
|
rv = fs::stat(fullpath_,st_); |
|
|
if(rv != 0) |
|
|
if(rv != 0) |
|
|
rv = fs::lstat(fullpath,st_); |
|
|
|
|
|
|
|
|
rv = fs::lstat(fullpath_,st_); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|