Ticket #11591: mythtv.patches.20130611.win32-path

File mythtv.patches.20130611.win32-path, 1.3 KB (added by Mark Spieth, 8 years ago)
Line 
1absolute path testing fixups for win32 support
2
3From: Mark Spieth <mspieth@digivation.com.au>
4
5
6---
7 mythtv/libs/libmythmetadata/dirscan.cpp |    8 ++++++--
8 1 file changed, 6 insertions(+), 2 deletions(-)
9
10diff --git a/mythtv/libs/libmythmetadata/dirscan.cpp b/mythtv/libs/libmythmetadata/dirscan.cpp
11index 4189d42..8a345ae 100644
12--- a/mythtv/libs/libmythmetadata/dirscan.cpp
13+++ b/mythtv/libs/libmythmetadata/dirscan.cpp
14@@ -237,15 +237,19 @@ bool ScanVideoDirectory(const QString &start_path, DirectoryHandler *handler,
15 
16     if (!start_path.startsWith("myth://"))
17     {
18+        QString path = start_path;
19+        if (path.startsWith("/") && (path.indexOf(':') == 2))
20+            path.remove(0,1);
21         LOG(VB_GENERAL, LOG_INFO,
22             QString("MythVideo::ScanVideoDirectory Scanning (%1)")
23                 .arg(start_path));
24+        LOG(VB_GENERAL, LOG_INFO, QString("MythVideo::ScanVideoDirectory Scanning (%1)").arg(path));
25 
26-        if (!scan_dir(start_path, handler, extlookup))
27+        if (!scan_dir(path, handler, extlookup))
28         {
29             LOG(VB_GENERAL, LOG_ERR,
30                 QString("MythVideo::ScanVideoDirectory failed to scan %1")
31-                    .arg(start_path));
32+                    .arg(path));
33             pathScanned = false;
34         }
35     }