diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2015-07-17 14:23:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2015-07-17 14:24:36 +0200 |
commit | e3a55c39b6dd7a866aa1033203a1813e646f8c50 (patch) | |
tree | 8ed4414769c88b371aef975fb55c4baf07287712 /butl/filesystem.ixx | |
parent | 0184c3182f3bdc83fd4dc6f10ed3609cca32990c (diff) |
Fix stat/lstat type/ltype to be consistent, use correct *stat()
Diffstat (limited to 'butl/filesystem.ixx')
-rw-r--r-- | butl/filesystem.ixx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/butl/filesystem.ixx b/butl/filesystem.ixx index 7aa3622..2d2690f 100644 --- a/butl/filesystem.ixx +++ b/butl/filesystem.ixx @@ -9,16 +9,16 @@ namespace butl inline entry_type dir_entry:: type () const { - return t_ != entry_type::unknown ? t_ : (t_ = type (false)); + entry_type t (ltype ()); + return t != entry_type::symlink + ? t + : lt_ != entry_type::unknown ? lt_ : (lt_ = type (true)); } inline entry_type dir_entry:: ltype () const { - entry_type t (type ()); - return t != entry_type::symlink - ? t - : lt_ != entry_type::unknown ? lt_ : (lt_ = type (true)); + return t_ != entry_type::unknown ? t_ : (t_ = type (false)); } // dir_iterator |