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(
156
156
}
157
157
158
158
$ canonicalUrl = $ this ->documentNameResolver ->canonicalUrl ($ renderContext ->getDirName (), $ sourcePath );
159
+ $ normalizedSourcePath = $ this ->documentNameResolver ->canonicalUrl ($ renderContext ->getDirName (), $ sourcePath );
160
+
159
161
$ outputPath = $ this ->documentNameResolver ->absoluteUrl (
160
162
$ renderContext ->getDestinationPath (),
161
163
$ canonicalUrl ,
162
164
);
163
165
164
166
try {
165
- if ($ renderContext ->getOrigin ()->has ($ sourcePath ) === false ) {
167
+ if ($ renderContext ->getOrigin ()->has ($ normalizedSourcePath ) === false ) {
166
168
$ this ->logger ->error (
167
- sprintf ('Image reference not found "%s" ' , $ sourcePath ),
169
+ sprintf ('Image reference not found "%s" ' , $ normalizedSourcePath ),
168
170
$ renderContext ->getLoggerInformation (),
169
171
);
170
172
171
173
return $ outputPath ;
172
174
}
173
175
174
- $ fileContents = $ renderContext ->getOrigin ()->read ($ sourcePath );
176
+ $ fileContents = $ renderContext ->getOrigin ()->read ($ normalizedSourcePath );
175
177
if ($ fileContents === false ) {
176
178
$ this ->logger ->error (
177
- sprintf ('Could not read image file "%s" ' , $ sourcePath ),
179
+ sprintf ('Could not read image file "%s" ' , $ normalizedSourcePath ),
178
180
$ renderContext ->getLoggerInformation (),
179
181
);
180
182
You can’t perform that action at this time.
0 commit comments