|
|
|
@ -18,7 +18,6 @@ import ( |
|
|
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/s3api/s3err" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/util" |
|
|
|
"github.com/seaweedfs/seaweedfs/weed/util/mem" |
|
|
|
|
|
|
|
"github.com/seaweedfs/seaweedfs/weed/glog" |
|
|
|
@ -88,13 +87,6 @@ func removeDuplicateSlashes(object string) string { |
|
|
|
} |
|
|
|
return result.String() |
|
|
|
} |
|
|
|
func (s3a *S3ApiServer) removeExpiredObject(w http.ResponseWriter, r *http.Request, entry *filer_pb.Entry, bucket, object string) { |
|
|
|
target := util.FullPath(fmt.Sprintf("%s/%s%s", s3a.option.BucketsPath, bucket, object)) |
|
|
|
dir, name := target.DirAndName() |
|
|
|
if rmErr := s3a.rm(dir, name, true, false); rmErr != nil { |
|
|
|
glog.Errorf("delete expired entries %s/%s: %v", dir, name, rmErr) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// checkDirectoryObject checks if the object is a directory object (ends with "/") and if it exists
|
|
|
|
// Returns: (entry, isDirectoryObject, error)
|
|
|
|
|