Skip to content
Snippets Groups Projects
Commit 60ba5508 authored by Robin Appelman's avatar Robin Appelman
Browse files

add support for installing apps from a subfolder in the zip/tgz file

parent d6a9af31
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment