functional/rpcpb: fix os.Remove error in SnapshotPath
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
@ -238,7 +238,7 @@ func (m *Member) WriteHealthKey() error {
|
||||
// snapshot file on local disk.
|
||||
func (m *Member) SaveSnapshot(lg *zap.Logger) (err error) {
|
||||
// remove existing snapshot first
|
||||
if err = os.Remove(m.SnapshotPath); err != nil {
|
||||
if err = os.RemoveAll(m.SnapshotPath); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user