diff --git a/includes/stream_wrappers.inc b/includes/stream_wrappers.inc
index 23faf4fc9daf0d8ff3da55279475016eedc94299..1f837783d2c58fc94f32ee63ca207cd922e5c4ce 100644
--- a/includes/stream_wrappers.inc
+++ b/includes/stream_wrappers.inc
@@ -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);
     }
   }
 
diff --git a/modules/system/system.archiver.inc b/modules/system/system.archiver.inc
index cd9c9f48c445f1757228605bdb72127413cf6422..5a0972840301768b7d016acb5ac127df0c9e5389 100644
--- a/modules/system/system.archiver.inc
+++ b/modules/system/system.archiver.inc
@@ -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;
   }