storage/Composite: avoid setting the error twice

If an error has already been set by f.directory->storage->GetInfo(),
don't set it again.
This commit is contained in:
Max Kellermann 2016-10-27 21:26:55 +02:00
parent 49c04ccfc7
commit ee026386e5
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}