Permalink
Browse files

Make RemoteFile::Exists work with no stated storage group

Fixes #9663

As the myth:// urls are being generated with no storage group, and the code to
handle QUERY_FILE_EXISTS works without one correctly, I've changed the code to
allow RemoteFile::Exists to ask about a file with no storage group stated.
  • Loading branch information...
Beirdo committed Mar 15, 2011
1 parent 15aea83 commit ed0014b847fce7d87f25ae9cd390b4460ffb462d
Showing with 4 additions and 3 deletions.
  1. +3 −2 mythtv/libs/libmythbase/remotefile.cpp
  2. +1 −1 mythtv/programs/mythbackend/mainserver.cpp
@@ -263,12 +263,13 @@ bool RemoteFile::Exists(const QString &url, struct stat *fileinfo)
if (filename.left(1) == "/")
filename = filename.right(filename.length()-1);
- if (filename.isEmpty() || sgroup.isEmpty())
+ if (filename.isEmpty())
return false;
QStringList strlist("QUERY_FILE_EXISTS");
strlist << filename;
- strlist << sgroup;
+ if (!sgroup.isEmpty())
+ strlist << sgroup;
gCoreContext->SendReceiveStringList(strlist);
@@ -408,7 +408,7 @@ void MainServer::ProcessRequestWork(MythSocket *sock)
}
else if (command == "QUERY_FILE_EXISTS")
{
- if (listline.size() < 3)
+ if (listline.size() < 2)
VERBOSE(VB_IMPORTANT, "Bad QUERY_FILE_EXISTS command");
else
HandleQueryFileExists(listline, pbs);

0 comments on commit ed0014b

Please sign in to comment.