diff --git a/src/views/LibraryView.vue b/src/views/LibraryView.vue index 27636b9..30fb290 100644 --- a/src/views/LibraryView.vue +++ b/src/views/LibraryView.vue @@ -727,7 +727,13 @@ const { isAdvanced } = useAdvancedMode() const { autoScanAfterRegister, toggleAutoScan } = useAutoScan() const router = useRouter() -const files = computed(() => filesCache.value) +const files = computed(() => { + // Filter out files with invalid paths (e.g., /tmp, /private/tmp) + return filesCache.value.filter((f: any) => { + const path = f.file_path || '' + return !path.startsWith('/tmp') && !path.startsWith('/private/tmp') + }) +}) const loading = computed(() => !filesLoaded.value) const statusText = ref('') const filterText = ref('') @@ -2093,7 +2099,14 @@ async function batchUnregister() { async function quickRegister(f: any) { if (registering.value) return - const filePath = f.file_path || f.relative_path || f.file_name + // Construct full file path if missing + let filePath = f.file_path || f.relative_path + if (!filePath) { + // Fallback: construct from known upload base path + const basePath = '/Users/accusys/momentry/var/sftpgo/data/demo' + filePath = `${basePath}/${f.file_name}` + } + if (!filePath) { actionMsg.value = 'Missing file path' setTimeout(() => { actionMsg.value = '' }, 8000)