Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignored files incorrect outside root #165

Conversation

Quetzacoalt91
Copy link
Member

@Quetzacoalt91 Quetzacoalt91 commented Sep 6, 2018

Duplicates #160

Recreated to be on the proper branch.


This change is Reviewable

@Quetzacoalt91 Quetzacoalt91 added this to the 4.2.0 milestone Sep 6, 2018
@@ -111,7 +111,7 @@ protected function listFilesToUpgrade($dir)
foreach ($allFiles as $file) {
$fullPath = $dir . DIRECTORY_SEPARATOR . $file;

if ($this->container->getFilesystemAdapter()->isFileSkipped($file, $fullPath, 'upgrade')) {
if ($this->container->getFilesystemAdapter()->isFileSkipped($file, $fullPath, 'upgrade', $this->container->getProperty(UpgradeContainer::LATEST_PATH))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you hate me, but line really long :/

if (null !== $temporaryWorkspace) {
$rootpath = str_replace('\\', '/', $temporaryWorkspace);
} else {
$rootpath = str_replace('\\', '/', $this->prodRootDir);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$rootpath = str_replace('\\', '/', null !== $temporaryWorkspace ? $temporaryWorkspace : $this->prodRootDir);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose to not write as you suggested. This makes the line quite difficult to read.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And like this ? :D

$rootpath = str_replace(
    '\\', 
    '/', 
    null !== $temporaryWorkspace ? $temporaryWorkspace : $this->prodRootDir
);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meh, ok!

@Quetzacoalt91 Quetzacoalt91 merged commit cf71953 into PrestaShop:dev Sep 10, 2018
@Quetzacoalt91 Quetzacoalt91 deleted the ignored-files-incorrect-outside-root branch September 10, 2018 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants