62 $this->archiveFilePath = $progressParams[
'archiveFilePath'];
63 $this->archiveFileType = $progressParams[
'archiveFileType'];
65 $this->totalFileCount = 0;
69 if (!$this->tmpFolder->isExists() || !$this->tmpFolder->isDirectory())
72 Loc::getMessage(
'TR_ERROR_CREATE_TEMP_FOLDER', [
'#PATH#' => $this->tmpFolder->getPhysicalPath()])
77 $this->tmpFolderPath = $this->tmpFolder->getPhysicalPath();
81 $this->archiveFile->setOptions([
'CHECK_PERMISSIONS' =>
false]);
83 if (!$this->archiveFile->isExists() || !$this->archiveFile->isFile())
86 new Error(Loc::getMessage(
'TR_ERROR_OPEN_FILE', [
'#FILE#' => $this->archiveFilePath]))
89 elseif ($this->archiveFileType !==
'.tar.gz' && $this->archiveFileType !==
'.tar')
96 if ($this->archiveFile->extract($this->tmpFolder) !==
true)
98 if ($this->archiveFile->hasErrors())
100 $this->
addErrors($this->archiveFile->getErrors());
105 new Main\
Error(Loc::getMessage(
'TR_ERROR_ARCHIVE'))
111 $this->totalFileCount = $this->archiveFile->getProcessedFileCount();
115 $this->processToken =
null;
122 'PROCESSED_ITEMS' => $this->totalFileCount,
123 'TOTAL_ITEMS' => $this->totalFileCount,