Compare commits
1 Commits
release/v1
...
release/v1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed1b38a22f |
@@ -1,10 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## v1.6.4
|
|
||||||
### Fixed
|
|
||||||
* Fixes a bug causing CPU limiting to not be properly applied to servers.
|
|
||||||
* Fixes a bug causing zip archives to decompress without taking into account nested folder structures.
|
|
||||||
|
|
||||||
## v1.6.3
|
## v1.6.3
|
||||||
### Fixed
|
### Fixed
|
||||||
* Fixes SFTP authentication failing for administrative users due to a permissions adjustment on the Panel.
|
* Fixes SFTP authentication failing for administrative users due to a permissions adjustment on the Panel.
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ func (l Limits) AsContainerResources() container.Resources {
|
|||||||
// @see https://github.com/pterodactyl/panel/issues/3988
|
// @see https://github.com/pterodactyl/panel/issues/3988
|
||||||
if l.CpuLimit > 0 {
|
if l.CpuLimit > 0 {
|
||||||
resources.CPUQuota = l.CpuLimit * 1_000
|
resources.CPUQuota = l.CpuLimit * 1_000
|
||||||
resources.CPUPeriod = 100_000
|
resources.CPUPeriod = 100_00
|
||||||
resources.CPUShares = 1024
|
resources.CPUShares = 1024
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,12 +5,9 @@ import (
|
|||||||
"archive/zip"
|
"archive/zip"
|
||||||
"compress/gzip"
|
"compress/gzip"
|
||||||
"fmt"
|
"fmt"
|
||||||
gzip2 "github.com/klauspost/compress/gzip"
|
|
||||||
zip2 "github.com/klauspost/compress/zip"
|
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
|
||||||
"strings"
|
"strings"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
@@ -175,26 +172,13 @@ func ExtractNameFromArchive(f archiver.File) string {
|
|||||||
return f.Name()
|
return f.Name()
|
||||||
}
|
}
|
||||||
switch s := sys.(type) {
|
switch s := sys.(type) {
|
||||||
case *zip.FileHeader:
|
|
||||||
return s.Name
|
|
||||||
case *zip2.FileHeader:
|
|
||||||
return s.Name
|
|
||||||
case *tar.Header:
|
case *tar.Header:
|
||||||
return s.Name
|
return s.Name
|
||||||
case *gzip.Header:
|
case *gzip.Header:
|
||||||
return s.Name
|
return s.Name
|
||||||
case *gzip2.Header:
|
case *zip.FileHeader:
|
||||||
return s.Name
|
return s.Name
|
||||||
default:
|
default:
|
||||||
// At this point we cannot figure out what type of archive this might be so
|
|
||||||
// just try to find the name field in the struct. If it is found return it.
|
|
||||||
field := reflect.Indirect(reflect.ValueOf(sys)).FieldByName("Name")
|
|
||||||
if field.IsValid() {
|
|
||||||
return field.String()
|
|
||||||
}
|
|
||||||
// Fallback to the basename of the file at this point. There is nothing we can really
|
|
||||||
// do to try and figure out what the underlying directory of the file is supposed to
|
|
||||||
// be since it didn't implement a name field.
|
|
||||||
return f.Name()
|
return f.Name()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
package system
|
package system
|
||||||
|
|
||||||
var Version = "1.6.4"
|
var Version = "1.6.3"
|
||||||
|
|||||||
Reference in New Issue
Block a user