fix deleting bucket

This commit is contained in:
Chris Lu 2018-11-08 22:15:21 -08:00
parent 70008b093e
commit 2697d6a4fb
2 changed files with 10 additions and 1 deletions

View file

@ -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.

View file

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