Compare commits
4 Commits
release/v1
...
v1.11.13
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71c5338549 | ||
|
|
326f115f5b | ||
|
|
06614de99d | ||
|
|
2b0e35360b |
@@ -1,5 +1,12 @@
|
||||
# Changelog
|
||||
|
||||
## v1.11.13
|
||||
|
||||
### Fixed
|
||||
|
||||
* Auto-configure not working ([#5087](https://github.com/pterodactyl/panel/issues/5087))
|
||||
* Individual files unable to be decompressed ([#5034](https://github.com/pterodactyl/panel/issues/5034))
|
||||
|
||||
## v1.11.12
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -23,7 +23,6 @@ I would like to extend my sincere thanks to the following sponsors for helping f
|
||||
| [**Aussie Server Hosts**](https://aussieserverhosts.com/) | No frills Australian Owned and operated High Performance Server hosting for some of the most demanding games serving Australia and New Zealand. |
|
||||
| [**BisectHosting**](https://www.bisecthosting.com/) | BisectHosting provides Minecraft, Valheim and other server hosting services with the highest reliability and lightning fast support since 2012. |
|
||||
| [**MineStrator**](https://minestrator.com/) | Looking for the most highend French hosting company for your minecraft server? More than 24,000 members on our discord trust us. Give us a try! |
|
||||
| [**VibeGAMES**](https://vibegames.net/) | VibeGAMES is a game server provider that specializes in DDOS protection for the games we offer. We have multiple locations in the US, Brazil, France, Germany, Singapore, Australia and South Africa. |
|
||||
| [**HostEZ**](https://hostez.io) | US & EU Rust & Minecraft Hosting. DDoS Protected bare metal, VPS and colocation with low latency, high uptime and maximum availability. EZ! |
|
||||
| [**Blueprint**](https://blueprint.zip/?pterodactyl=true) | Create and install Pterodactyl addons and themes with the growing Blueprint framework - the package-manager for Pterodactyl. Use multiple modifications at once without worrying about conflicts and make use of the large extension ecosystem. |
|
||||
| [**indifferent broccoli**](https://indifferentbroccoli.com/) | indifferent broccoli is a game server hosting and rental company. With us, you get top-notch computer power for your gaming sessions. We destroy lag, latency, and complexity--letting you focus on the fun stuff. |
|
||||
|
||||
@@ -155,6 +155,9 @@ func configureCmdRun(cmd *cobra.Command, args []string) {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// Manually specify the Panel URL as it won't be decoded from JSON.
|
||||
cfg.PanelLocation = configureArgs.PanelURL
|
||||
|
||||
if err = config.WriteToDisk(cfg); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@@ -156,6 +156,7 @@ func (fs *Filesystem) DecompressFile(ctx context.Context, dir string, file strin
|
||||
}
|
||||
|
||||
return fs.extractStream(ctx, extractStreamOptions{
|
||||
FileName: file,
|
||||
Directory: dir,
|
||||
Format: format,
|
||||
Reader: input,
|
||||
@@ -190,11 +191,74 @@ type extractStreamOptions struct {
|
||||
}
|
||||
|
||||
func (fs *Filesystem) extractStream(ctx context.Context, opts extractStreamOptions) error {
|
||||
// Decompress and extract archive
|
||||
|
||||
// See if it's a compressed archive, such as TAR or a ZIP
|
||||
ex, ok := opts.Format.(archiver.Extractor)
|
||||
if !ok {
|
||||
|
||||
// If not, check if it's a single-file compression, such as
|
||||
// .log.gz, .sql.gz, and so on
|
||||
de, ok := opts.Format.(archiver.Decompressor)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Strip the compression suffix
|
||||
p := filepath.Join(opts.Directory, strings.TrimSuffix(opts.FileName, opts.Format.Name()))
|
||||
|
||||
// Make sure it's not ignored
|
||||
if err := fs.IsIgnored(p); err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
reader, err := de.OpenReader(opts.Reader)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer reader.Close()
|
||||
|
||||
// Open the file for creation/writing
|
||||
f, err := fs.unixFS.OpenFile(p, ufs.O_WRONLY|ufs.O_CREATE, 0o644)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
// Read in 4 KB chunks
|
||||
buf := make([]byte, 4096)
|
||||
for {
|
||||
n, err := reader.Read(buf)
|
||||
if n > 0 {
|
||||
|
||||
// Check quota before writing the chunk
|
||||
if quotaErr := fs.HasSpaceFor(int64(n)); quotaErr != nil {
|
||||
return quotaErr
|
||||
}
|
||||
|
||||
// Write the chunk
|
||||
if _, writeErr := f.Write(buf[:n]); writeErr != nil {
|
||||
return writeErr
|
||||
}
|
||||
|
||||
// Add to quota
|
||||
fs.addDisk(int64(n))
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
// EOF are expected
|
||||
if err == io.EOF {
|
||||
break
|
||||
}
|
||||
|
||||
// Return any other
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Decompress and extract archive
|
||||
return ex.Extract(ctx, opts.Reader, nil, func(ctx context.Context, f archiver.File) error {
|
||||
if f.IsDir() {
|
||||
return nil
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package system
|
||||
|
||||
var Version = "1.11.12"
|
||||
var Version = "develop"
|
||||
|
||||
Reference in New Issue
Block a user