From e3dc48f95b496c8a90df8a843a8754ca68362be9 Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Tue, 13 Aug 2024 16:58:50 +0200 Subject: [PATCH] fix: undefined filename in livephoto Signed-off-by: skjnldsv --- src/utils/fileUtils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/fileUtils.ts b/src/utils/fileUtils.ts index 80c5817fa..2a1d3dda0 100644 --- a/src/utils/fileUtils.ts +++ b/src/utils/fileUtils.ts @@ -125,6 +125,10 @@ function getDavPath({ filename, source = '' }: { filename: string, source?: stri // https://github.com/nextcloud/server/issues/19700 const prefixUser = davRootPath + if (!filename || typeof filename !== 'string') { + return null + } + // If we have a source but we're not a dav resource, return null if (source && !source.includes(prefixUser)) { return null