From 8783eb99f7db7c8d08f2b33223a9a547438c021a Mon Sep 17 00:00:00 2001 From: Daniel Tosello Date: Tue, 12 Jan 2016 16:47:52 +1100 Subject: [PATCH] Modified swift handling to explicitly set 404 responses to false --- apps/files_external/lib/swift.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/files_external/lib/swift.php b/apps/files_external/lib/swift.php index 02bfc44c36..62c28f19b4 100644 --- a/apps/files_external/lib/swift.php +++ b/apps/files_external/lib/swift.php @@ -323,7 +323,8 @@ class Swift extends \OC\Files\Storage\Common { $streamInterface->rewind(); $stream = $streamInterface->getStream(); stream_context_set_option($stream, 'swift','content', $streamInterface); - if(is_resource($stream)) { + if(!strrpos($streamInterface + ->getMetaData('wrapper_data')[0], '404 Not Found')) { return $stream; } return false;