From 31bb91583f1523c635d691de2c7941a35ac26fd6 Mon Sep 17 00:00:00 2001 From: chrislu Date: Thu, 9 Feb 2023 17:30:44 -0800 Subject: [PATCH] fix bug when vid not found fix https://github.com/seaweedfs/seaweedfs/issues/4193 --- weed/shell/command_ec_encode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/shell/command_ec_encode.go b/weed/shell/command_ec_encode.go index a023686dc..59bd0d828 100644 --- a/weed/shell/command_ec_encode.go +++ b/weed/shell/command_ec_encode.go @@ -99,7 +99,7 @@ func doEcEncode(commandEnv *CommandEnv, collection string, vid needle.VolumeId, // find volume location locations, found := commandEnv.MasterClient.GetLocations(uint32(vid)) - if !found && len(locations) > 0 { + if !found { return fmt.Errorf("volume %d not found", vid) }