From 2cb912e4f4622e87f9ab319e2f2fd7bfb1e71499 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 14 Jan 2014 12:34:49 +0100 Subject: [PATCH] db/upnp: Namei() returns error when no object was found Don't fail silently. --- src/db/UpnpDatabasePlugin.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/db/UpnpDatabasePlugin.cxx b/src/db/UpnpDatabasePlugin.cxx index 258122200..8a99e9cd6 100644 --- a/src/db/UpnpDatabasePlugin.cxx +++ b/src/db/UpnpDatabasePlugin.cxx @@ -575,7 +575,9 @@ UpnpDatabase::Namei(ContentDirectoryService* server, odirent = dirent; return true; } else { - return true; + error.Format(db_domain, DB_NOT_FOUND, + "No such object"); + return false; } } } @@ -585,7 +587,8 @@ UpnpDatabase::Namei(ContentDirectoryService* server, break; } - return true; + error.Format(db_domain, DB_NOT_FOUND, "No such object"); + return false; } // vpath is a parsed and writeable version of selection.uri. There is