diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-05-07 17:31:24 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-05-07 17:31:24 -0700 |
commit | 0c79bb6e7c679552faba6cb333592eb1da26db35 (patch) | |
tree | 6eb08236422a8f31862f1d898d8fddcf08eb0b3c /wutil.cpp | |
parent | 1a264ab7c20cbd0e20eef3e3d83fedb7b69c163d (diff) |
Factor is_potential_path to properly handle CDPATH
This will let us color cd commands better
Diffstat (limited to 'wutil.cpp')
-rw-r--r-- | wutil.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -73,10 +73,11 @@ bool wreaddir_resolving(DIR *dir, const std::wstring &dir_path, std::wstring &ou out_name = str2wcstring(d->d_name); if (out_is_dir) { + /* The caller cares if this is a directory, so check */ bool is_dir; if (d->d_type == DT_DIR) { is_dir = true; - } else if (d->d_type == DT_LNK) { + } else if (d->d_type == DT_LNK || d->d_type == DT_UNKNOWN) { /* We want to treat symlinks to directories as directories. Use stat to resolve it. */ cstring fullpath = wcs2string(dir_path); fullpath.push_back('/'); |