Skip to content

Commit f03737a

Browse files
authored
Update Transcode.php
Fix Craft CMS 4.x filesystems…
1 parent 345cd49 commit f03737a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/services/Transcode.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,8 +787,9 @@ protected function getAssetPath(Asset|string $filePath): string
787787

788788
if ($assetVolume) {
789789
// If it's local, get a path to the file
790-
if ($assetVolume instanceof Local) {
791-
$sourcePath = rtrim($assetVolume->path, DIRECTORY_SEPARATOR);
790+
$fs = $assetVolume->getFs();
791+
if ($fs instanceof Local) {
792+
$sourcePath = rtrim($fs->path, DIRECTORY_SEPARATOR);
792793
$sourcePath .= '' === $sourcePath ? '' : DIRECTORY_SEPARATOR;
793794
$folderPath = '';
794795
try {

0 commit comments

Comments
 (0)