|
@@ 119-122 (lines=4) @@
|
| 116 |
|
} |
| 117 |
|
|
| 118 |
|
$extractDir .= '/' . $info['id']; |
| 119 |
|
if(!file_exists($extractDir)) { |
| 120 |
|
OC_Helper::rmdirr($basedir); |
| 121 |
|
throw new \Exception($l->t("Archive does not contain a directory named %s", $info['id'])); |
| 122 |
|
} |
| 123 |
|
OC_Helper::copyr($extractDir, $basedir); |
| 124 |
|
|
| 125 |
|
//remove temporary files |
|
@@ 308-314 (lines=7) @@
|
| 305 |
|
mkdir($extractDir); |
| 306 |
|
if($archive=\OC\Archive\Archive::open($path)) { |
| 307 |
|
$archive->extract($extractDir); |
| 308 |
|
} else { |
| 309 |
|
OC_Helper::rmdirr($extractDir); |
| 310 |
|
if($data['source']=='http') { |
| 311 |
|
unlink($path); |
| 312 |
|
} |
| 313 |
|
throw new \Exception($l->t("Failed to open archive when installing app")); |
| 314 |
|
} |
| 315 |
|
|
| 316 |
|
return array( |
| 317 |
|
$extractDir, |