File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -156,25 +156,27 @@ private function copyAsset(
156156 }
157157
158158 $ canonicalUrl = $ this ->documentNameResolver ->canonicalUrl ($ renderContext ->getDirName (), $ sourcePath );
159+ $ normalizedSourcePath = $ this ->documentNameResolver ->canonicalUrl ($ renderContext ->getDirName (), $ sourcePath );
160+
159161 $ outputPath = $ this ->documentNameResolver ->absoluteUrl (
160162 $ renderContext ->getDestinationPath (),
161163 $ canonicalUrl ,
162164 );
163165
164166 try {
165- if ($ renderContext ->getOrigin ()->has ($ sourcePath ) === false ) {
167+ if ($ renderContext ->getOrigin ()->has ($ normalizedSourcePath ) === false ) {
166168 $ this ->logger ->error (
167- sprintf ('Image reference not found "%s" ' , $ sourcePath ),
169+ sprintf ('Image reference not found "%s" ' , $ normalizedSourcePath ),
168170 $ renderContext ->getLoggerInformation (),
169171 );
170172
171173 return $ outputPath ;
172174 }
173175
174- $ fileContents = $ renderContext ->getOrigin ()->read ($ sourcePath );
176+ $ fileContents = $ renderContext ->getOrigin ()->read ($ normalizedSourcePath );
175177 if ($ fileContents === false ) {
176178 $ this ->logger ->error (
177- sprintf ('Could not read image file "%s" ' , $ sourcePath ),
179+ sprintf ('Could not read image file "%s" ' , $ normalizedSourcePath ),
178180 $ renderContext ->getLoggerInformation (),
179181 );
180182
You can’t perform that action at this time.
0 commit comments