Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't raise exception when the bucket already exists. S3 doesn't do that

either.
  • Loading branch information...
commit 1c44cca4bb11acd800043eff913e64bbdce87942 1 parent 395eac6
@pneff pneff authored committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/parkplace/s3.rb
View
2  lib/parkplace/s3.rb
@@ -29,7 +29,7 @@ def put(bucket_name)
bucket = Bucket.find_root(bucket_name)
only_owner_of bucket
bucket.grant(requested_acl)
- raise BucketAlreadyExists
+ r(200, '', 'Location' => @env.PATH_INFO, 'Content-Length' => 0)
rescue NoSuchBucket
Bucket.create(:name => bucket_name, :owner_id => @user.id).grant(requested_acl)
r(200, '', 'Location' => @env.PATH_INFO, 'Content-Length' => 0)
Please sign in to comment.
Something went wrong with that request. Please try again.