diff --git a/web/src/components/panels/FilesToPublish.vue b/web/src/components/panels/FilesToPublish.vue index 8c5082fe6..0e3e90d7b 100644 --- a/web/src/components/panels/FilesToPublish.vue +++ b/web/src/components/panels/FilesToPublish.vue @@ -34,7 +34,7 @@ const deploymentStore = useDeploymentStore(); const files = ref([]); const expanded = ref([]); -type FileInfo = Pick; +type FileInfo = Pick; const fileMap = ref(new Map()); @@ -56,9 +56,14 @@ const selectedFileTotalSize = computed(() : string => { }); const fileSummary = computed(() => { - const count = deploymentStore.files.length; const path = deploymentStore.deployment?.sourcePath; + // Calculate the number of files that are "files" (i.e., regular files, not directories, symlinks, etc.) + const count = deploymentStore.files + .map(file => fileMap.value.get(file)) + .filter(info => info?.isFile) + .length; + if (count) { return `${count} files selected from ${path} (total = ${selectedFileTotalSize.value})`; } else if (path) { @@ -83,6 +88,7 @@ function populateFileMap(file: DeploymentFile) { size: file.size, isEntrypoint: file.isEntrypoint, exclusion: file.exclusion, + isFile: file.isFile }; fileMap.value.set(file.id, info); file.files.forEach(populateFileMap);