mirror of
https://github.com/pgsty/minio.git
synced 2026-07-19 04:00:25 +03:00
minor cleanup
- Reused contains() from utils.go at a couple of places - Cleanup in return statements and boolean checks
This commit is contained in:
committed by
Harshavardhana
parent
ec4260d260
commit
418921de89
@@ -268,9 +268,7 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
|
||||
}
|
||||
|
||||
// Skip the first element if it is '/', split the rest.
|
||||
if strings.HasPrefix(objectSource, "/") {
|
||||
objectSource = objectSource[1:]
|
||||
}
|
||||
objectSource = strings.TrimPrefix(objectSource, "/")
|
||||
splits := strings.SplitN(objectSource, "/", 2)
|
||||
|
||||
// Save sourceBucket and sourceObject extracted from url Path.
|
||||
|
||||
Reference in New Issue
Block a user