Skip to content

Commit

Permalink
Have extract override
Browse files Browse the repository at this point in the history
  • Loading branch information
LordRalex committed Apr 13, 2024
1 parent a2c2877 commit e97e613
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion servers/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ var lock = sync.Mutex{}
var startQueueTicker, statTicker *time.Ticker
var running = false

func init() {
archiver.DefaultZip.OverwriteExisting = true
archiver.DefaultTarGz.OverwriteExisting = true
}

func InitService() {
queue = list.New()
running = true
Expand Down Expand Up @@ -622,7 +627,6 @@ func (p *Server) Extract(source, destination string) error {
if _, err := os.Stat(destinationFile); os.IsNotExist(err) {
return pufferpanel.ErrFileExists
}

return archiver.Unarchive(sourceFile, destinationFile)
}

Expand Down

0 comments on commit e97e613

Please sign in to comment.