Loading inc/aws-sdk/Aws/S3/StreamWrapper.php +12 −0 Original line number Diff line number Diff line Loading @@ -369,6 +369,18 @@ class StreamWrapper return $this->formatUrlStat(self::$client->headObject($parts)->toArray()); } catch (NoSuchKeyException $e) { // Maybe this isn't an actual key, but a prefix. Do a prefix listing of objects to determine. /** * Modification by Joe Hoyle * * If there is an extension, we don't need to check if it's a dir. There is an issue with checking * if it's a dir, as s3 doesn't have true directories. See https://forums.aws.amazon.com/thread.jspa?threadID=142985 * for a more in-depth example. */ if ( $extension ) { return $this->triggerError("File or directory not found: {$path}", $flags); } $result = self::$client->listObjects(array( 'Bucket' => $parts['Bucket'], 'Prefix' => $parts['Key'], Loading Loading
inc/aws-sdk/Aws/S3/StreamWrapper.php +12 −0 Original line number Diff line number Diff line Loading @@ -369,6 +369,18 @@ class StreamWrapper return $this->formatUrlStat(self::$client->headObject($parts)->toArray()); } catch (NoSuchKeyException $e) { // Maybe this isn't an actual key, but a prefix. Do a prefix listing of objects to determine. /** * Modification by Joe Hoyle * * If there is an extension, we don't need to check if it's a dir. There is an issue with checking * if it's a dir, as s3 doesn't have true directories. See https://forums.aws.amazon.com/thread.jspa?threadID=142985 * for a more in-depth example. */ if ( $extension ) { return $this->triggerError("File or directory not found: {$path}", $flags); } $result = self::$client->listObjects(array( 'Bucket' => $parts['Bucket'], 'Prefix' => $parts['Key'], Loading