Skip to content

Commit

Permalink
refactor: Moved log to better describe what is actually happening
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Pickel authored and Pascal Pickel committed Jul 23, 2024
1 parent 13433c6 commit 17ac011
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/features/programSample/samples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ export const downloadFile = async (fileName: string) => {
const url = `${SERVER_URL}/${fileName}`;

if (existsSync(targetFile)) return;
logger.info(`Sample not found locally, downloading ${url}`);

if (existsSync(fullPath(fileName))) {
logger.info(`Sample is bundled with app, copying.`);
await copyFile(fullPath(fileName), targetFile);
return;
}

logger.info(`Sample not found locally, downloading ${url}`);
const response = await fetch(url);
const blob = await response.blob();
const buffer = await blob.arrayBuffer();
Expand Down

0 comments on commit 17ac011

Please sign in to comment.