[Pkg-owncloud-commits] [owncloud] 62/73: Fix 'App already installed' for app with entry in DB and no files

David Prévot taffit at alioth.debian.org
Fri Nov 8 23:09:13 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v4.0.10
in repository owncloud.

commit 6244d68b6a50facac1d1cfbe51fedf7acfbb2daf
Author: Victor Dubiniuk <victor.dubiniuk at gmail.com>
Date:   Thu Oct 18 23:10:33 2012 +0300

    Fix 'App already installed' for app with entry in DB and no files
---
 lib/installer.php |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/installer.php b/lib/installer.php
index c5ca088..dacdbdb 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -145,12 +145,14 @@ class OC_Installer{
 
 		//check if an app with the same id is already installed
 		if(self::isInstalled( $info['id'] )){
-			OC_Log::write('core','App already installed',OC_Log::WARN);
-			OC_Helper::rmdirr($extractDir);
-			if($data['source']=='http'){
-				unlink($path);
+			if (OC_App::getAppInfo($app, true)!==null){
+				OC_Log::write('core','App already installed',OC_Log::WARN);
+				OC_Helper::rmdirr($extractDir);
+				if($data['source']=='http'){
+					unlink($path);
+				}
+				return false;
 			}
-			return false;
 		}
 
 		//check if the destination directory already exists

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list