From e5131ddff7bf6a011e17c2ef80448e7ca42d25f9 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Sun, 10 Oct 2010 21:24:55 +0300 Subject: [PATCH 1/7] fixed: uninstallation of addons with hidden files --- xbmc/FileSystem/Directory.cpp | 4 ++-- xbmc/FileSystem/Directory.h | 3 ++- xbmc/utils/FileOperationJob.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/xbmc/FileSystem/Directory.cpp b/xbmc/FileSystem/Directory.cpp index a91f0ed..737ede6 100644 --- a/xbmc/FileSystem/Directory.cpp +++ b/xbmc/FileSystem/Directory.cpp @@ -120,7 +120,7 @@ CDirectory::CDirectory() CDirectory::~CDirectory() {} -bool CDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items, CStdString strMask /*=""*/, bool bUseFileDirectories /* = true */, bool allowPrompting /* = false */, DIR_CACHE_TYPE cacheDirectory /* = DIR_CACHE_ONCE */, bool extFileInfo /* = true */, bool allowThreads /* = false */) +bool CDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items, CStdString strMask /*=""*/, bool bUseFileDirectories /* = true */, bool allowPrompting /* = false */, DIR_CACHE_TYPE cacheDirectory /* = DIR_CACHE_ONCE */, bool extFileInfo /* = true */, bool allowThreads /* = false */, bool getHidden /* = false */) { try { @@ -209,7 +209,7 @@ bool CDirectory::GetDirectory(const CStdString& strPath, CFileItemList &items, C { CFileItemPtr item = items[i]; if ((!item->m_bIsFolder && !pDirectory->IsAllowed(item->m_strPath)) || - (item->GetPropertyBOOL("file:hidden") && !g_guiSettings.GetBool("filelists.showhidden"))) + (item->GetPropertyBOOL("file:hidden") && !getHidden && !g_guiSettings.GetBool("filelists.showhidden"))) { items.Remove(i); i--; // don't confuse loop diff --git a/xbmc/FileSystem/Directory.h b/xbmc/FileSystem/Directory.h index acf8523..7ad728a 100644 --- a/xbmc/FileSystem/Directory.h +++ b/xbmc/FileSystem/Directory.h @@ -41,7 +41,8 @@ public: , bool allowPrompting=false , DIR_CACHE_TYPE cacheDirectory=DIR_CACHE_ONCE , bool extFileInfo=true - , bool allowThreads=false); + , bool allowThreads=false + , bool getHidden=false); static bool Create(const CStdString& strPath); static bool Exists(const CStdString& strPath); diff --git a/xbmc/utils/FileOperationJob.cpp b/xbmc/utils/FileOperationJob.cpp index 26e4053..a52e6037 100644 --- a/xbmc/utils/FileOperationJob.cpp +++ b/xbmc/utils/FileOperationJob.cpp @@ -94,7 +94,7 @@ bool CFileOperationJob::DoProcessFolder(FileAction action, const CStdString& str CLog::Log(LOGDEBUG,"FileManager, processing folder: %s",strPath.c_str()); CFileItemList items; //m_rootDir.GetDirectory(strPath, items); - CDirectory::GetDirectory(strPath, items, "", false); + CDirectory::GetDirectory(strPath, items, "", false, false, DIR_CACHE_ONCE, true, false, true); for (int i = 0; i < items.Size(); i++) { CFileItemPtr pItem = items[i]; -- 1.7.3