summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Pinkham <cpinkham@mythtv.org>2011-01-04 06:10:08 (GMT)
committer Chris Pinkham <cpinkham@mythtv.org>2011-01-04 06:10:08 (GMT)
commit68fa6e86af79be799b578cf393ea499e151e386b (patch)
tree2df2c082ef1a60932ed03bea715d2cc88f8eb7b3
parent86ab1b26e163a7c39aebf6968fa34bbb1943354c (diff)
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.
-rw-r--r--mythtv/libs/libmythdb/storagegroup.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/mythtv/libs/libmythdb/storagegroup.cpp b/mythtv/libs/libmythdb/storagegroup.cpp
index f7fb6f4..5cef5d1 100644
--- a/mythtv/libs/libmythdb/storagegroup.cpp
+++ b/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;