storage/Interface: wrap StorageDirectoryReader in std::unique_ptr

This commit is contained in:
Max Kellermann
2018-01-21 11:04:30 +01:00
parent a9847ebf54
commit 61eb2aa328
9 changed files with 29 additions and 33 deletions

View File

@@ -337,7 +337,7 @@ UpdateWalk::UpdateDirectory(Directory &directory,
std::unique_ptr<StorageDirectoryReader> reader;
try {
reader.reset(storage.OpenDirectory(directory.GetPath()));
reader = storage.OpenDirectory(directory.GetPath());
} catch (...) {
LogError(std::current_exception());
return false;