Completely re-work the server configuration to be separated out better

This commit is contained in:
Dane Everitt
2020-07-19 16:27:55 -07:00
parent a00288aa64
commit 0cbaad5c72
16 changed files with 495 additions and 409 deletions

View File

@@ -21,7 +21,7 @@ import (
func (fs *Filesystem) SpaceAvailableForDecompression(dir string, file string) (bool, error) {
// Don't waste time trying to determine this if we know the server will have the space for
// it since there is no limit.
if fs.Server.Build.DiskSpace <= 0 {
if fs.Server.Build().DiskSpace <= 0 {
return true, nil
}
@@ -60,7 +60,7 @@ func (fs *Filesystem) SpaceAvailableForDecompression(dir string, file string) (b
wg.Wait()
return ((dirSize + size) / 1000.0 / 1000.0) <= fs.Server.Build.DiskSpace, cErr
return ((dirSize + size) / 1000.0 / 1000.0) <= fs.Server.Build().DiskSpace, cErr
}
// Decompress a file in a given directory by using the archiver tool to infer the file