cleanup: return error type in cleanupRBDImageMetadataStash()

Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
Niels de Vos 2020-12-08 15:10:22 +01:00 committed by mergify[bot]
parent f262673b60
commit d8e443ab49

View File

@ -1135,7 +1135,7 @@ func lookupRBDImageMetadataStash(path string) (rbdImageMetadataStash, error) {
func cleanupRBDImageMetadataStash(path string) error { func cleanupRBDImageMetadataStash(path string) error {
fPath := filepath.Join(path, stashFileName) fPath := filepath.Join(path, stashFileName)
if err := os.Remove(fPath); err != nil { if err := os.Remove(fPath); err != nil {
return fmt.Errorf("failed to cleanup stashed JSON data (%s): (%v)", fPath, err) return fmt.Errorf("failed to cleanup stashed JSON data (%s): %w", fPath, err)
} }
return nil return nil