diff --git a/cmd/posix.go b/cmd/posix.go index dbe934965..b6c09771e 100644 --- a/cmd/posix.go +++ b/cmd/posix.go @@ -1452,10 +1452,7 @@ func deleteFile(basePath, deletePath string, recursive bool) error { } } - // Trailing slash is removed when found to ensure - // slashpath.Dir() to work as intended. - deletePath = strings.TrimSuffix(deletePath, SlashSeparator) - deletePath = slashpath.Dir(deletePath) + deletePath = filepath.Dir(deletePath) // Delete parent directory obviously not recursively. Errors for // parent directories shouldn't trickle down.