diff --git a/src/GoogleStorageAdapter.php b/src/GoogleStorageAdapter.php index faff062..f79717c 100644 --- a/src/GoogleStorageAdapter.php +++ b/src/GoogleStorageAdapter.php @@ -280,7 +280,12 @@ public function setVisibility($path, $visibility) $object = $this->getObject($path); if ($visibility === AdapterInterface::VISIBILITY_PRIVATE) { + try { $object->acl()->delete('allUsers'); + } + catch (NotFoundException $e) { + // Not actually an exception, no ACL to delete. + } } elseif ($visibility === AdapterInterface::VISIBILITY_PUBLIC) { $object->acl()->add('allUsers', Acl::ROLE_READER); }