Don't try to remove a non-existent file

This commit is contained in:
Dane Everitt 2020-04-11 17:46:36 -07:00
parent 3bd48bbac1
commit 89e5b63c32
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -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)
} }