Don't ignore disk space limits when copying/archiving; closes pterodactyl/panel#2400

This commit is contained in:
Dane Everitt
2020-09-24 21:18:10 -07:00
parent 1a3ba9efca
commit bf1233def4
5 changed files with 69 additions and 33 deletions

View File

@@ -47,11 +47,12 @@ func (s *Server) Config() *Configuration {
return &s.cfg
}
// Returns the amount of disk space available to a server in bytes.
func (s *Server) DiskSpace() int64 {
s.cfg.mu.RLock()
defer s.cfg.mu.RUnlock()
return s.cfg.Build.DiskSpace
return s.cfg.Build.DiskSpace * 1000.0 * 1000.0
}
func (s *Server) MemoryLimit() int64 {