Fix .rar file decompression; closes pterodactyl/panel#3267

This commit is contained in:
Dane Everitt
2021-04-17 13:13:37 -07:00
parent 16b0ca3a8e
commit 4b244e96fb
3 changed files with 4 additions and 30 deletions

View File

@@ -121,11 +121,7 @@ func (fs *Filesystem) DecompressFile(dir string, file string) error {
if f.IsDir() {
return nil
}
name, err := system.ExtractArchiveSourceName(f, dir)
if err != nil {
return WrapError(err, filepath.Join(dir, f.Name()))
}
p := filepath.Join(dir, name)
p := filepath.Join(dir, f.Name())
// If it is ignored, just don't do anything with the file and skip over it.
if err := fs.IsIgnored(p); err != nil {
return nil