diff --git a/packages/server-core/src/projects/project/project-helper.ts b/packages/server-core/src/projects/project/project-helper.ts index 887ddbdd04..fe7121309d 100644 --- a/packages/server-core/src/projects/project/project-helper.ts +++ b/packages/server-core/src/projects/project/project-helper.ts @@ -1678,6 +1678,19 @@ const staticResourceClasses = [ AssetType.Prefab ] +const ignoreFiles = ['.ds_store'] + +/** + * Checks whether a file is to be ignored in resources.json and static-resources + * @param key + */ +export const isIgnoredFile = (key: string) => { + for (const ignoreFile of ignoreFiles) { + if (key.includes(ignoreFile)) return true + } + return false +} + /** * Updates the local storage provider with the project's current files * @param app Application object @@ -1757,7 +1770,10 @@ export const uploadLocalProjectToProvider = async ( }, { isDirectory: false } ) - if (!filePathRelative.startsWith(`assets/`) && !filePathRelative.startsWith(`public/`)) { + if ( + (!filePathRelative.startsWith(`assets/`) && !filePathRelative.startsWith(`public/`)) || + isIgnoredFile(filePathRelative) + ) { existingKeySet.delete(key) continue }