fs/DirectoryReader: use C++ exceptions instead of class Error

This commit is contained in:
Max Kellermann
2015-12-29 12:41:45 +01:00
parent 826a654c95
commit f3503e0026
12 changed files with 79 additions and 76 deletions

View File

@@ -70,15 +70,9 @@ skip_path(Path name_fs)
#endif
CommandResult
handle_listfiles_local(Response &r,
const char *path_utf8, Path path_fs)
handle_listfiles_local(Response &r, Path path_fs)
{
DirectoryReader reader(path_fs);
if (reader.HasFailed()) {
Error error;
error.FormatErrno("Failed to open '%s'", path_utf8);
return print_error(r, error);
}
while (reader.ReadEntry()) {
const Path name_fs = reader.GetEntry();