From 1c2667d3b95c04a2ef164ca04b5aede6a7315bcf 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 Signed-off-by: nextcloud-command [skip ci] --- src/utils/fileUtils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/fileUtils.ts b/src/utils/fileUtils.ts index 8ff7cf396..38c580485 100644 --- a/src/utils/fileUtils.ts +++ b/src/utils/fileUtils.ts @@ -132,6 +132,10 @@ function getDavPath({ filename, basename, source = '' }: { filename: string, bas const prefixUser = getUserRoot() + 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