Skip to content

Commit

Permalink
fix(manifests): ignore .DS_Store file
Browse files Browse the repository at this point in the history
  • Loading branch information
robingenz committed Nov 1, 2024
1 parent 5e83d14 commit 5e7ef8e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { createBufferFromPath } from './buffer';
import { getFilesInDirectoryAndSubdirectories, writeFile } from './file';
import { createHash } from './hash';

const ignoreFiles = ['.DS_Store', MANIFEST_JSON_FILE_NAME];

export const generateManifestJson = async (path: string) => {
const manifestItems: ManifestItem[] = [];
// Get all files
Expand All @@ -13,8 +15,8 @@ export const generateManifestJson = async (path: string) => {
const checksum = await createHash(fileBuffer);
const sizeInBytes = fileBuffer.byteLength;
const href = file.path.replace(path + '/', '');
// Do NOT include the manifest file itself
if (href === MANIFEST_JSON_FILE_NAME) {
// Skip ignored files
if (ignoreFiles.includes(file.name)) {
continue;
}
manifestItems.push({
Expand Down

0 comments on commit 5e7ef8e

Please sign in to comment.