Skip to content

Commit a141061

Browse files
committed
MTA-4065: Import Advanced Pricing if Incorrect Data
- simplification the method in the FileHelper class
1 parent 9c9802a commit a141061

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

dev/tests/functional/lib/Magento/Mtf/Util/Filesystem/FileHelper.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ public function normalizePath($path, $ds = DIRECTORY_SEPARATOR)
2424
return $path;
2525
}
2626

27+
return $this->realpath($ds, $path);
28+
}
29+
30+
/**
31+
* Returns canonicalized pathname.
32+
*
33+
* @param string $ds
34+
* @param string $path
35+
* @return string
36+
*/
37+
private function realpath($ds, $path)
38+
{
2739
$parts = [];
2840
foreach (explode($ds, $path) as $part) {
2941
if ($part === '..' && !empty($parts) && end($parts) !== '..') {
@@ -34,6 +46,7 @@ public function normalizePath($path, $ds = DIRECTORY_SEPARATOR)
3446
$parts[] = $part;
3547
}
3648
}
49+
3750
$path = implode($ds, $parts);
3851

3952
return $path === '' ? '.' : $path;

0 commit comments

Comments
 (0)