diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:36 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:36 +0000 |
commit | ef5d0b5e97ec8e6fa395d377b09aa7755e345b4f (patch) | |
tree | 27916256fdeeb57d10d2f3d6948be5d71a703215 /source/Commands/CommandCompletions.cpp | |
parent | 76e0736e7fcfeb179779e49c05604464b1ccd704 (diff) |
Notes
Diffstat (limited to 'source/Commands/CommandCompletions.cpp')
-rw-r--r-- | source/Commands/CommandCompletions.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/Commands/CommandCompletions.cpp b/source/Commands/CommandCompletions.cpp index fd84e1c4f857..34cad970ff6e 100644 --- a/source/Commands/CommandCompletions.cpp +++ b/source/Commands/CommandCompletions.cpp @@ -199,14 +199,14 @@ static int DiskFilesOrDirectories(const llvm::Twine &partial_name, // We have a match. - fs::file_status st; - if ((EC = Entry.status(st))) + llvm::ErrorOr<fs::basic_file_status> st = Entry.status(); + if (!st) continue; // If it's a symlink, then we treat it as a directory as long as the target // is a directory. - bool is_dir = fs::is_directory(st); - if (fs::is_symlink_file(st)) { + bool is_dir = fs::is_directory(*st); + if (fs::is_symlink_file(*st)) { fs::file_status target_st; if (!fs::status(Entry.path(), target_st)) is_dir = fs::is_directory(target_st); |