aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/filelist.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index b3d88085b7c..fbd07729c74 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -2232,6 +2232,10 @@
this.hideMask();
if (status === 401) {
+ if (this.getCurrentDirectory() === '/') {
+ // Give up, if we are not authorized to access user root folder, we are logged out
+ location.reload(); // this will redirect the user to the login page while saving the current url
+ }
return false;
}