summaryrefslogtreecommitdiff
path: root/src/storage
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-12-29 12:41:45 +0100
committerMax Kellermann <max@duempel.org>2015-12-29 12:56:26 +0100
commitf3503e00264aaf5adb298c651f101c83d97600ef (patch)
tree2fd740a0bfa69407b60a9f5a6a909b3a81e4fb27 /src/storage
parent826a654c95c962c88f7eb803b50f6fd51504d273 (diff)
fs/DirectoryReader: use C++ exceptions instead of class Error
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/plugins/LocalStorage.cxx14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/storage/plugins/LocalStorage.cxx b/src/storage/plugins/LocalStorage.cxx
index b35161dd1..91bbb8957 100644
--- a/src/storage/plugins/LocalStorage.cxx
+++ b/src/storage/plugins/LocalStorage.cxx
@@ -41,10 +41,6 @@ public:
LocalDirectoryReader(AllocatedPath &&_base_fs)
:base_fs(std::move(_base_fs)), reader(base_fs) {}
- bool HasFailed() {
- return reader.HasFailed();
- }
-
/* virtual methods from class StorageDirectoryReader */
const char *Read() override;
bool GetInfo(bool follow, StorageFileInfo &info,
@@ -160,15 +156,7 @@ LocalStorage::OpenDirectory(const char *uri_utf8, Error &error)
if (path_fs.IsNull())
return nullptr;
- LocalDirectoryReader *reader =
- new LocalDirectoryReader(std::move(path_fs));
- if (reader->HasFailed()) {
- error.FormatErrno("Failed to open '%s'", uri_utf8);
- delete reader;
- return nullptr;
- }
-
- return reader;
+ return new LocalDirectoryReader(std::move(path_fs));
}
gcc_pure