Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: undefined filename in livephoto #2418

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions js/viewer-main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26978,6 +26978,9 @@ const genFileInfo = function(obj) {
};
function getDavPath({ filename, source = "" }) {
const prefixUser = davRootPath;
if (!filename || typeof filename !== "string") {
return null;
}
if (source && !source.includes(prefixUser)) {
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion js/viewer-main.mjs.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/utils/fileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading