From 31ce1b8b157fb7190f4e3cd57a691b02b0366066 Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Sun, 10 Oct 2010 20:32:43 +0300 Subject: [PATCH 6/7] fixed: old addon files were not removed on update When updating addon, some files may have been dropped in the new version. Handle those by emptying the addon directory before copying the new files in (by using the new ActionReplace instead of ActionCopy). --- xbmc/GUIWindowAddonBrowser.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xbmc/GUIWindowAddonBrowser.cpp b/xbmc/GUIWindowAddonBrowser.cpp index 4d84e17..0de3f0f 100644 --- a/xbmc/GUIWindowAddonBrowser.cpp +++ b/xbmc/GUIWindowAddonBrowser.cpp @@ -310,7 +310,7 @@ void CGUIWindowAddonBrowser::OnJobComplete(unsigned int jobID, if (success) { CFileOperationJob* job = (CFileOperationJob*)job2; - if (job->GetAction() == CFileOperationJob::ActionCopy) + if (job->GetAction() == CFileOperationJob::ActionReplace) { for (int i=0;iGetItems().Size();++i) { @@ -429,7 +429,7 @@ unsigned int CGUIWindowAddonBrowser::AddJob(const CStdString& path) } list[0]->Select(true); - CFileOperationJob* job = new CFileOperationJob(CFileOperationJob::ActionCopy, + CFileOperationJob* job = new CFileOperationJob(CFileOperationJob::ActionReplace, list,dest); return CJobManager::GetInstance().AddJob(job,this); } -- 1.7.3