Skip to content
Snippets Groups Projects
Commit 540ce2b4 authored by Angie Byron's avatar Angie Byron
Browse files

#1006302 by aspilicious, bfroehle: Fixed can't install projects packed as zip in Update Manager.

parent f6cd923e
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -671,11 +671,14 @@ public function rmdir($uri, $options) {
*/
public function url_stat($uri, $flags) {
$this->uri = $uri;
if ($flags & STREAM_URL_STAT_QUIET) {
return @stat($this->getLocalPath());
$path = $this->getLocalPath();
// Suppress warnings if requested or if the file or directory does not
// exist. This is consistent with PHP's plain filesystem stream wrapper.
if ($flags & STREAM_URL_STAT_QUIET || !file_exists($path)) {
return @stat($path);
}
else {
return stat($this->getLocalPath());
return stat($path);
}
}
......
......@@ -106,7 +106,12 @@ public function remove($file_path) {
}
public function extract($path, Array $files = array()) {
$this->zip->extractTo($path, $files);
if ($files) {
$this->zip->extractTo($path, $files);
}
else {
$this->zip->extractTo($path);
}
return $this;
}
......
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