Don't try to remove a non-existent file
This commit is contained in:
parent
3bd48bbac1
commit
89e5b63c32
|
@ -205,12 +205,5 @@ func deleteServer(c *gin.Context) {
|
||||||
// Deallocate the reference to this server.
|
// Deallocate the reference to this server.
|
||||||
s = nil
|
s = nil
|
||||||
|
|
||||||
// Remove the configuration file stored on the Daemon for this server.
|
|
||||||
go func(u string) {
|
|
||||||
if err := os.Remove("data/servers/" + u + ".yml"); err != nil {
|
|
||||||
zap.S().Warnw("failed to delete server configuration file while processing deletion request", zap.String("server", u), zap.Error(errors.WithStack(err)))
|
|
||||||
}
|
|
||||||
}(uuid)
|
|
||||||
|
|
||||||
c.Status(http.StatusNoContent)
|
c.Status(http.StatusNoContent)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user