Skip to content

Commit

Permalink
fix: Avoid push thumbnails if they already exist in the path (#3141)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox authored Jul 22, 2024
1 parent 6d821af commit a95931d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/modules/inspector/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,13 @@ export function* inspectorSaga(builder: BuilderAPI, store: RootStore) {

const project: Project = yield select(getCurrentProject)
if (project.thumbnail) {
paths.push('assets/scene/thumbnail.png')
paths.push('thumbnails/scene/thumbnail.png')
// add thumbnail if missing
if (!paths.includes('assets/scene/thumbnail.png')) {
paths.push('assets/scene/thumbnail.png')
}
if (!paths.includes('thumbnails/scene/thumbnail.png')) {
paths.push('thumbnails/scene/thumbnail.png')
}
}

const files: { name: string; isDirectory: boolean }[] = []
Expand Down

0 comments on commit a95931d

Please sign in to comment.