Skip to content

Commit

Permalink
Update RackspaceAdapter->has() to catch OpenCloud ObjectNotFoundExcep…
Browse files Browse the repository at this point in the history
…tions, to return a proper has value.
  • Loading branch information
Hunter Skrasek committed Mar 4, 2014
1 parent ee607ae commit 680e823
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Adapter/Rackspace.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use League\Flysystem\Util;
use OpenCloud\ObjectStore\Resource\Container;
use OpenCloud\ObjectStore\Resource\DataObject;
use OpenCloud\ObjectStore\Exception\ObjectNotFoundException;
use Guzzle\Http\Exception\ClientErrorResponseException;

class Rackspace extends AbstractAdapter
Expand Down Expand Up @@ -163,6 +164,8 @@ public function has($path)
$object = $this->getObject($path);
} catch(ClientErrorResponseException $e) {
return false;
} catch(ObjectNotFoundException $e) {
return false;
}

return $this->normalizeObject($object);
Expand Down

0 comments on commit 680e823

Please sign in to comment.