Skip to content

Commit 7f6355e

Browse files
committed
MAGETWO-95646: Custom file attribute works incorrect
1 parent 38b4353 commit 7f6355e

File tree

1 file changed

+7
-0
lines changed
  • lib/internal/Magento/Framework/Filesystem/Driver

1 file changed

+7
-0
lines changed

lib/internal/Magento/Framework/Filesystem/Driver/File.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,13 @@ public function fileUnlock($resource)
843843
*/
844844
public function getAbsolutePath($basePath, $path, $scheme = null)
845845
{
846+
// check if the path given is already an absolute path containing the
847+
// basepath. so if the basepath starts at position 0 in the path, we
848+
// must not concatinate them again because path is already absolute.
849+
if (0 === strpos($path, $basePath)) {
850+
return $this->getScheme($scheme) . $path;
851+
}
852+
846853
return $this->getScheme($scheme) . $basePath . ltrim($this->fixSeparator($path), '/');
847854
}
848855

0 commit comments

Comments
 (0)