aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2023-02-09 17:30:44 -0800
committerchrislu <chris.lu@gmail.com>2023-02-09 17:30:44 -0800
commit31bb91583f1523c635d691de2c7941a35ac26fd6 (patch)
treefaf63e45ccbdd18213a68478cc411bc27f577788
parent532a352121250d9cb34199b7ef8cbbd45cf2ad3b (diff)
downloadseaweedfs-31bb91583f1523c635d691de2c7941a35ac26fd6.tar.xz
seaweedfs-31bb91583f1523c635d691de2c7941a35ac26fd6.zip
fix bug when vid not found
fix https://github.com/seaweedfs/seaweedfs/issues/4193
-rw-r--r--weed/shell/command_ec_encode.go2
1 files changed, 1 insertions, 1 deletions
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)
}