From ee026386e557da59806d06585e968622df365032 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 27 Oct 2016 21:26:55 +0200 Subject: [PATCH] storage/Composite: avoid setting the error twice If an error has already been set by f.directory->storage->GetInfo(), don't set it again. --- src/storage/CompositeStorage.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/storage/CompositeStorage.cxx b/src/storage/CompositeStorage.cxx index 9e0a45f42..ba04c8f45 100644 --- a/src/storage/CompositeStorage.cxx +++ b/src/storage/CompositeStorage.cxx @@ -286,7 +286,8 @@ CompositeStorage::GetInfo(const char *uri, bool follow, FileInfo &info, return true; } - error.Set(composite_domain, "No such directory"); + if (!error.IsDefined()) + error.Set(composite_domain, "No such directory"); return false; }