mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdctl: snapshot status error for non-existent file
This commit is contained in:
@@ -297,6 +297,10 @@ type dbstatus struct {
|
||||
}
|
||||
|
||||
func dbStatus(p string) dbstatus {
|
||||
if _, err := os.Stat(p); err != nil {
|
||||
ExitWithError(ExitError, err)
|
||||
}
|
||||
|
||||
ds := dbstatus{}
|
||||
|
||||
db, err := bolt.Open(p, 0600, nil)
|
||||
|
||||
Reference in New Issue
Block a user