Fix FileDownloader test
modifié: core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilder/TarArchiveBuilder.php modifié: core/lib/Thelia/Tests/FileFormat/Archive/ArchiveBuilder/TarArchiveBuilderTest.php modifié: core/lib/Thelia/Tools/FileDownload/FileDownloader.php modifié: core/lib/Thelia/Tools/URL.php
This commit is contained in:
@@ -20,6 +20,7 @@ use Thelia\Core\Translation\Translator;
|
||||
use Thelia\Exception\FileNotReadableException;
|
||||
=======
|
||||
use Thelia\Core\FileFormat\Archive\ArchiveBuilderInterface;
|
||||
use Thelia\Core\Thelia;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
>>>>>>> Finish implementing and testing zip
|
||||
use Thelia\Log\Tlog;
|
||||
@@ -259,6 +260,9 @@ class TarArchiveBuilder extends AbstractArchiveBuilder
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> Fix FileDownloader test
|
||||
$pathToFile = $this->formatFilePath($pathToFile);
|
||||
|
||||
if (!$this->hasFile($pathToFile)) {
|
||||
@@ -267,11 +271,19 @@ class TarArchiveBuilder extends AbstractArchiveBuilder
|
||||
|
||||
/** @var \PharFileInfo $fileInfo*/
|
||||
$fileInfo = $this->tar[$pathToFile];
|
||||
<<<<<<< HEAD
|
||||
|
||||
/** @var \SplFileObject $file */
|
||||
$file = $fileInfo->openFile();
|
||||
$content = "";
|
||||
|
||||
=======
|
||||
|
||||
/** @var \SplFileObject $file */
|
||||
$file = $fileInfo->openFile();
|
||||
$content = "";
|
||||
|
||||
>>>>>>> Fix FileDownloader test
|
||||
while (false !== ($char = $file->fgetc())) {
|
||||
$content .= $char;
|
||||
}
|
||||
@@ -359,6 +371,8 @@ class TarArchiveBuilder extends AbstractArchiveBuilder
|
||||
=======
|
||||
public function buildArchiveResponse()
|
||||
{
|
||||
$this->tar->setMetadata("comment", "Generated by Thelia v" . Thelia::THELIA_VERSION);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -397,9 +411,14 @@ class TarArchiveBuilder extends AbstractArchiveBuilder
|
||||
$instance->setFileDownloader($fileDownloader);
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
$instance->setCacheFile($instance->getCacheFile())
|
||||
->copyFile($pathToArchive, $isOnline);
|
||||
>>>>>>> Finish implementing and testing zip
|
||||
=======
|
||||
$instance->setCacheFile($instance->generateCacheFile($environment))
|
||||
->copyFile($pathToArchive, $instance->getCacheFile(), $isOnline);
|
||||
>>>>>>> Fix FileDownloader test
|
||||
|
||||
/**
|
||||
* This throws TarArchiveBuilderException if
|
||||
|
||||
Reference in New Issue
Block a user