Skip to content

Commit bf06f3f

Browse files
skjnldsvnextcloud-command
authored andcommitted
fix: undefined filename in livephoto
Signed-off-by: skjnldsv <skjnldsv@protonmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
1 parent ca91f53 commit bf06f3f

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

js/viewer-main.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26978,6 +26978,9 @@ const genFileInfo = function(obj) {
2697826978
};
2697926979
function getDavPath({ filename, source = "" }) {
2698026980
const prefixUser = davRootPath;
26981+
if (!filename || typeof filename !== "string") {
26982+
return null;
26983+
}
2698126984
if (source && !source.includes(prefixUser)) {
2698226985
return null;
2698326986
}

js/viewer-main.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/fileUtils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ function getDavPath({ filename, source = '' }: { filename: string, source?: stri
125125
// https://github.com/nextcloud/server/issues/19700
126126
const prefixUser = davRootPath
127127

128+
if (!filename || typeof filename !== 'string') {
129+
return null
130+
}
131+
128132
// If we have a source but we're not a dav resource, return null
129133
if (source && !source.includes(prefixUser)) {
130134
return null

0 commit comments

Comments
 (0)