aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotspiff <cptspiff@gmail.com>2016-11-28 15:26:54 +0100
committernotspiff <cptspiff@gmail.com>2016-11-28 15:27:31 +0100
commitb8bf34142a1b5b19e789cd017f92bcddce5bdb60 (patch)
treea40437f736a0d34e1851b720508259ae5e48db23
parent9617cac38cfcd33f6b53bd8d1af401b36c167907 (diff)
fixed: tighten vcd .dat file checks to avoid unwanted filtering
ref http://forum.kodi.tv/showthread.php?tid=298161
-rw-r--r--xbmc/filesystem/IDirectory.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/xbmc/filesystem/IDirectory.cpp b/xbmc/filesystem/IDirectory.cpp
index b7530eaa74..edb57e6646 100644
--- a/xbmc/filesystem/IDirectory.cpp
+++ b/xbmc/filesystem/IDirectory.cpp
@@ -69,6 +69,16 @@ bool IDirectory::IsAllowed(const CURL& url) const
if (URIUtils::HasExtension(url, ".dat"))
{
std::string fileName = URIUtils::GetFileName(url);
+ std::string folder = URIUtils::GetDirectory(fileName);
+ URIUtils::RemoveSlashAtEnd(folder);
+ folder = URIUtils::GetFileName(folder);
+ if (folder.size() <= 3) // cannot be a vcd variant
+ return true;
+
+ if (!StringUtils::CompareNoCase(folder, "vcd") &&
+ !StringUtils::CompareNoCase(folder, "MPEGAV") &&
+ !StringUtils::CompareNoCase(folder, "CDDA"))
+ return true;
// Allow filenames of the form AVSEQ##(#).DAT, ITEM###(#).DAT
// and MUSIC##(#).DAT