aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorulion <ulion2002@gmail.com>2013-04-12 16:22:32 -0700
committerulion <ulion2002@gmail.com>2013-04-12 16:22:32 -0700
commitc32990d5db40abe71fe887be59b38f90048b008f (patch)
treeac04ccf5de60b2db9edb10555ea2d7d31bb8987b
parent340eebf007e211519fdcf6c95ef71ba13a55032e (diff)
parent87c4faf2822470f597d46c15d30b97b93cf1d752 (diff)
Merge pull request #2608 from ulion/check_dir_exists_use_dircache_fix
Fix problems introduced by PR2496 (check dir exists use dircache)
-rw-r--r--xbmc/filesystem/Directory.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/xbmc/filesystem/Directory.cpp b/xbmc/filesystem/Directory.cpp
index 7a526e1616..dac2e7ac32 100644
--- a/xbmc/filesystem/Directory.cpp
+++ b/xbmc/filesystem/Directory.cpp
@@ -255,15 +255,16 @@ bool CDirectory::Exists(const CStdString& strPath, bool bUseCache /* = true */)
{
try
{
+ CStdString realPath = URIUtils::SubstitutePath(strPath);
if (bUseCache)
{
bool bPathInCache;
- if (g_directoryCache.FileExists(strPath, bPathInCache))
+ URIUtils::AddSlashAtEnd(realPath);
+ if (g_directoryCache.FileExists(realPath, bPathInCache))
return true;
if (bPathInCache)
return false;
}
- CStdString realPath = URIUtils::SubstitutePath(strPath);
auto_ptr<IDirectory> pDirectory(CDirectoryFactory::Create(realPath));
if (pDirectory.get())
return pDirectory->Exists(realPath.c_str());