diff --git a/src/GoogleStorageAdapter.php b/src/GoogleStorageAdapter.php index d5e6c9d..c5c5335 100755 --- a/src/GoogleStorageAdapter.php +++ b/src/GoogleStorageAdapter.php @@ -323,7 +323,13 @@ public function setVisibility($path, $visibility) */ public function has($path) { - return $this->getObject($path)->exists(); + if ($this->getObject($path)->exists()) { + return true; + } + + return count(array_filter($this->listContents($path), function ($item) use ($path) { + return $item['path'] === $path; + })) === 1; } /**