Permalink
Browse files

Find subdirs before parents when searching for SG relative pathname.

In StorageGroup::GetRelativePathname(), order the SG directory list
in descending order so that we find subdirs before their parents
in case there are SG directories underneath other SG directories.

References #9435.
  • Loading branch information...
1 parent 86ab1b2 commit 68fa6e86af79be799b578cf393ea499e151e386b @cpinkham cpinkham committed Jan 4, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 mythtv/libs/libmythdb/storagegroup.cpp
@@ -356,7 +356,8 @@ QString StorageGroup::GetRelativePathname(const QString &filename)
return result;
}
- query.prepare("SELECT DISTINCT dirname FROM storagegroup;");
+ query.prepare("SELECT DISTINCT dirname FROM storagegroup "
+ "ORDER BY dirname DESC;");
if (query.exec())
{
QString dirname;

0 comments on commit 68fa6e8

Please sign in to comment.