Skip to content

Commit

Permalink
normalize thumb path (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoecheza authored Nov 11, 2024
1 parent d1591ae commit b4b46da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/preload/src/modules/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,8 @@ export async function saveThumbnail({
const thumbnailPath = getProjectThumbnailPath();
const currentThumb = scene.display?.navmapThumbnail;
await deepWriteFile(path.join(_path, thumbnailPath), thumbnail, { encoding: 'base64' });
const shouldOverwrite = !currentThumb || !(await exists(path.join(_path, currentThumb)));
if (shouldOverwrite) await updateSceneThumbnail(_path, thumbnailPath);
const currentThumbPath = path.join(_path, path.normalize(currentThumb || ''));
if (!(await exists(currentThumbPath))) await updateSceneThumbnail(_path, thumbnailPath);
}

export async function openFolder(_path: string) {
Expand Down

0 comments on commit b4b46da

Please sign in to comment.