Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-03-29 02:11:29 +0400
committerRobin Appelman <icewind@owncloud.com>2012-03-29 02:11:29 +0400
commit60ba5508a4bfaf0581301a6240011060a7432997 (patch)
tree2c182aa55d54d874941bd3d33c130ae6f94a35e6 /lib/installer.php
parentd6a9af31389819c95084e33aab3c7f4a6d4cbef8 (diff)
add support for installing apps from a subfolder in the zip/tgz file
Diffstat (limited to 'lib/installer.php')
-rw-r--r--lib/installer.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/installer.php b/lib/installer.php
index db64d8e32d5..c5ecacae544 100644
--- a/lib/installer.php
+++ b/lib/installer.php
@@ -105,6 +105,17 @@ class OC_Installer{
//load the info.xml file of the app
if(!is_file($extractDir.'/appinfo/info.xml')){
+ //try to find it in a subdir
+ $dh=opendir($extractDir);
+ while($folder=readdir($dh)){
+ if(substr($folder,0,1)!='.' and is_dir($extractDir.'/'.$folder)){
+ if(is_file($extractDir.'/'.$folder.'/appinfo/info.xml')){
+ $extractDir.='/'.$folder;
+ }
+ }
+ }
+ }
+ if(!is_file($extractDir.'/appinfo/info.xml')){
OC_Log::write('core','App does not provide an info.xml file',OC_Log::ERROR);
OC_Helper::rmdirr($extractDir);
if($data['source']=='http'){