Skip to content

Commit

Permalink
fix 404 on public files with /login url #6406
Browse files Browse the repository at this point in the history
Signed-off-by: si458 <simonsmith5521@gmail.com>
  • Loading branch information
si458 committed Sep 26, 2024
1 parent 61fb689 commit 39a1755
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions views/default-mobile.handlebars
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en" dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
Expand Down Expand Up @@ -2694,7 +2694,7 @@
d3filetreelocation2.push(d3filetreelocation[i]);
if ((folderdepth == 1)) {
var sp = d3filetreelocation[i].split('/');
publicPath = window.location + sp[0] + 'files/' + sp[2];
publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
if (d3filetreelocation[i] === userinfo._id) { d3filetreelinkpath += 'self'; } else { d3filetreelinkpath += (sp[0] + '/' + sp[2]); }
} else {
if (d3filetreelinkpath != '') { d3filetreelinkpath += '/' + d3filetreelocation[i]; if (folderdepth > 2) { publicPath += '/' + d3filetreelocation[i]; } }
Expand Down Expand Up @@ -2788,7 +2788,7 @@
fullPath += ' / ' + filetreelocation[i];
if ((folderdepth == 1)) {
var sp = filetreelocation[i].split('/');
publicPath = window.location + sp[0] + 'files/' + sp[2];
publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
//if (filetreelocation[i] === userinfo._id) { filetreelinkpath += 'self'; } else { filetreelinkpath += (sp[0] + '/' + sp[2]); }
filetreelinkpath += filetreelocation[i];
} else {
Expand Down
4 changes: 2 additions & 2 deletions views/default.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -14729,7 +14729,7 @@
fullPath += ' / ' + filetreelocation[i];
if ((folderdepth == 1)) {
var sp = filetreelocation[i].split('/');
publicPath = (("" + window.location).split('?')[0]) + sp[0] + 'files/' + sp[2];
publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
//if (filetreelocation[i] === userinfo._id) { filetreelinkpath += 'self'; } else { filetreelinkpath += (sp[0] + '/' + sp[2]); }
filetreelinkpath += filetreelocation[i];
} else {
Expand Down Expand Up @@ -17394,7 +17394,7 @@
d3filetreelocation2.push(d3filetreelocation[i]);
if ((folderdepth == 1)) {
var sp = d3filetreelocation[i].split('/');
publicPath = window.location + sp[0] + 'files/' + sp[2];
publicPath = window.location.origin + '/' + sp[0] + 'files/' + sp[2];
if (d3filetreelocation[i] === userinfo._id) { d3filetreelinkpath += 'self'; } else { d3filetreelinkpath += (sp[0] + '/' + sp[2]); }
} else {
if (d3filetreelinkpath != '') { d3filetreelinkpath += '/' + d3filetreelocation[i]; if (folderdepth > 2) { publicPath += '/' + d3filetreelocation[i]; } }
Expand Down

0 comments on commit 39a1755

Please sign in to comment.