Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: aws/aws-sdk-php
...
head fork: wizardz/aws-sdk-php
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/Aws/S3/StreamWrapper.php
View
10 src/Aws/S3/StreamWrapper.php
@@ -350,7 +350,7 @@ public function url_stat($path, $flags)
'MaxKeys' => 1
));
if (!$result['Contents'] && !$result['CommonPrefixes']) {
- return $this->triggerError("File or directory not found: {$path}", $flags);
+ return false;
}
// This is a directory prefix
return $this->formatUrlStat($path);
@@ -400,12 +400,14 @@ public function rmdir($path)
$params = $this->getParams($path);
if (!$params['Bucket']) {
return $this->triggerError('You cannot delete s3://. Please specify a bucket.');
- } elseif ($params['Key']) {
- return $this->triggerError('rmdir() only supports bucket deletion');
}
try {
- self::$client->deleteBucket(array('Bucket' => $params['Bucket']));
+ if ($params['Key']) {
+ return $this->unlink($path);
+ } else {
+ self::$client->deleteBucket(array('Bucket' => $params['Bucket']));
+ }
$this->clearStatInfo($path);
return true;
} catch (\Exception $e) {

No commit comments for this range

Something went wrong with that request. Please try again.