|
@@ 116-119 (lines=4) @@
|
| 113 |
|
} |
| 114 |
|
|
| 115 |
|
$extractDir .= '/' . $info['id']; |
| 116 |
|
if(!file_exists($extractDir)) { |
| 117 |
|
OC_Helper::rmdirr($basedir); |
| 118 |
|
throw new \Exception($l->t("Archive does not contain a directory named %s", $info['id'])); |
| 119 |
|
} |
| 120 |
|
OC_Helper::copyr($extractDir, $basedir); |
| 121 |
|
|
| 122 |
|
//remove temporary files |
|
@@ 300-306 (lines=7) @@
|
| 297 |
|
mkdir($extractDir); |
| 298 |
|
if($archive=OC_Archive::open($path)) { |
| 299 |
|
$archive->extract($extractDir); |
| 300 |
|
} else { |
| 301 |
|
OC_Helper::rmdirr($extractDir); |
| 302 |
|
if($data['source']=='http') { |
| 303 |
|
unlink($path); |
| 304 |
|
} |
| 305 |
|
throw new \Exception($l->t("Failed to open archive when installing app")); |
| 306 |
|
} |
| 307 |
|
|
| 308 |
|
return array( |
| 309 |
|
$extractDir, |