Browse Source

fix deleting bucket

pull/769/head 1.04
Chris Lu 6 years ago
parent
commit
2697d6a4fb
  1. 7
      other/java/s3copy/copier/src/main/java/com/seaweedfs/s3/PutObject.java
  2. 4
      weed/storage/volume_read_write.go

7
other/java/s3copy/copier/src/main/java/com/seaweedfs/s3/PutObject.java

@ -79,6 +79,13 @@ public class PutObject {
// test deletes
s3Client.deleteObject(bucketName, stringObjKeyName);
// delete bucket
String tmpBucket = "tmpbucket";
s3Client.createBucket(tmpBucket);
s3Client.putObject(tmpBucket, stringObjKeyName, stringContent);
s3Client.deleteBucket(tmpBucket);
} catch (AmazonServiceException e) {
// The call was transmitted successfully, but Amazon S3 couldn't process
// it, so it returned an error response.

4
weed/storage/volume_read_write.go

@ -42,7 +42,9 @@ func (v *Volume) Destroy() (err error) {
}
v.Close()
os.Remove(v.FileName() + ".dat")
err = v.nm.Destroy()
if v.nm!=nil{
err = v.nm.Destroy()
}
os.Remove(v.FileName() + ".cpd")
os.Remove(v.FileName() + ".cpx")
os.Remove(v.FileName() + ".ldb")

Loading…
Cancel
Save