xbmc: add PR2493

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-05-10 13:44:52 +02:00
parent 07a982b6ad
commit 7d5d727690

View File

@ -0,0 +1,29 @@
From ff283b0861afd35410d20c52fee8ba0542e91f8a Mon Sep 17 00:00:00 2001
From: ulion <ulion2002@gmail.com>
Date: Sun, 24 Mar 2013 13:19:39 +0800
Subject: [PATCH] Check exists before listing dir, to avoid produce error log,
fix #14210
---
xbmc/video/VideoInfoScanner.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/xbmc/video/VideoInfoScanner.cpp b/xbmc/video/VideoInfoScanner.cpp
index 170b5a9..fbe7913 100644
--- a/xbmc/video/VideoInfoScanner.cpp
+++ b/xbmc/video/VideoInfoScanner.cpp
@@ -1771,7 +1771,10 @@
void CVideoInfoScanner::FetchActorThumbs(vector<SActorInfo>& actors, const CStdString& strPath)
{
CFileItemList items;
- CDirectory::GetDirectory(URIUtils::AddFileToFolder(strPath, ".actors"), items, ".png|.jpg|.tbn", DIR_FLAG_NO_FILE_DIRS | DIR_FLAG_NO_FILE_INFO);
+ CStdString actorsDir = URIUtils::AddFileToFolder(strPath, ".actors");
+ if (CDirectory::Exists(actorsDir))
+ CDirectory::GetDirectory(actorsDir, items, ".png|.jpg|.tbn", DIR_FLAG_NO_FILE_DIRS |
+ DIR_FLAG_NO_FILE_INFO);
for (vector<SActorInfo>::iterator i = actors.begin(); i != actors.end(); ++i)
{
if (i->thumb.IsEmpty())
--
1.8.1.6