From f03737af80372ab6c04742f0e1f9e93b7642b3c8 Mon Sep 17 00:00:00 2001 From: Harald Atteneder Date: Fri, 17 Mar 2023 10:13:00 +0100 Subject: [PATCH] Update Transcode.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix Craft CMS 4.x filesystems… --- src/services/Transcode.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/services/Transcode.php b/src/services/Transcode.php index 0a2a69b..f8dc087 100644 --- a/src/services/Transcode.php +++ b/src/services/Transcode.php @@ -787,8 +787,9 @@ protected function getAssetPath(Asset|string $filePath): string if ($assetVolume) { // If it's local, get a path to the file - if ($assetVolume instanceof Local) { - $sourcePath = rtrim($assetVolume->path, DIRECTORY_SEPARATOR); + $fs = $assetVolume->getFs(); + if ($fs instanceof Local) { + $sourcePath = rtrim($fs->path, DIRECTORY_SEPARATOR); $sourcePath .= '' === $sourcePath ? '' : DIRECTORY_SEPARATOR; $folderPath = ''; try {