Skip to content

Commit a050516

Browse files
author
Hwashiang Yu
committed
MC-31362: Media folder update
- Fixed edge case in file driver
1 parent d53c7ca commit a050516

File tree

1 file changed

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

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,9 @@ public function getRealPathSafety($path)
983983
$path
984984
);
985985
$pathParts = explode(DIRECTORY_SEPARATOR, $path);
986+
if (end($pathParts) == '.') {
987+
$pathParts[count($pathParts)] = '';
988+
}
986989
$realPath = [];
987990
foreach ($pathParts as $pathPart) {
988991
if ($pathPart == '.') {

0 commit comments

Comments
 (0)