File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
packages/builder/src/storage/providers Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -242,7 +242,8 @@ export class GitHubStorageProvider implements StorageProvider {
242242 if ( ! obj . key ) continue
243243
244244 const dir = path . dirname ( obj . key )
245- const basename = path . basename ( obj . key , path . extname ( obj . key ) )
245+ // use path.parse to safely get the filename without extension (case-insensitive extension handling)
246+ const basename = path . parse ( obj . key ) . name
246247 const groupKey = `${ dir } /${ basename } `
247248
248249 if ( ! fileGroups . has ( groupKey ) ) {
Original file line number Diff line number Diff line change @@ -236,7 +236,9 @@ export class LocalStorageProvider implements StorageProvider {
236236
237237 // 如果是图片文件,查找对应的视频文件
238238 if ( SUPPORTED_FORMATS . has ( ext ) ) {
239- const baseName = path . basename ( obj . key , ext )
239+ // use path.parse to get the name without extension to avoid issues
240+ // when the file extension has different casing (e.g. .HEIC)
241+ const baseName = path . parse ( obj . key ) . name
240242 const dirName = path . dirname ( obj . key )
241243
242244 // 查找对应的 .mov 文件
Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ export class S3StorageProvider implements StorageProvider {
229229 if ( ! obj . key ) continue
230230
231231 const dir = path . dirname ( obj . key )
232- const basename = path . basename ( obj . key , path . extname ( obj . key ) )
232+ const basename = path . parse ( obj . key ) . name
233233 const groupKey = `${ dir } /${ basename } `
234234
235235 if ( ! fileGroups . has ( groupKey ) ) {
You can’t perform that action at this time.
0 commit comments