diff --git includes/stream_wrappers.inc includes/stream_wrappers.inc index 23faf4f..1f83778 100644 --- includes/stream_wrappers.inc +++ includes/stream_wrappers.inc @@ -671,11 +671,14 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface */ 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); } } diff --git modules/system/system.archiver.inc modules/system/system.archiver.inc index 9972bfc..a1bf2ff 100644 --- modules/system/system.archiver.inc +++ modules/system/system.archiver.inc @@ -106,7 +106,12 @@ class ArchiverZip implements ArchiverInterface { } 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; }