diff options
Diffstat (limited to 'Userland/Utilities/du.cpp')
-rw-r--r-- | Userland/Utilities/du.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Utilities/du.cpp b/Userland/Utilities/du.cpp index 038b150d58..fc1ea7acf6 100644 --- a/Userland/Utilities/du.cpp +++ b/Userland/Utilities/du.cpp @@ -106,7 +106,8 @@ int parse_args(int argc, char** argv, Vector<String>& files, DuOption& du_option auto file = Core::File::construct(exclude_from); bool success = file->open(Core::OpenMode::ReadOnly); VERIFY(success); - if (const auto buff = file->read_all()) { + const auto buff = file->read_all(); + if (!buff.is_empty()) { String patterns = String::copy(buff, Chomp); du_option.excluded_patterns.append(patterns.split('\n')); } |