Explorar o código

GH-2631 Empty Path to Filebrowser making Folders Inaccessible (#2645)

Akhil S Naik %!s(int64=4) %!d(string=hai) anos
pai
achega
c5a44c6adb
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      apps/filebrowser/src/filebrowser/views.py

+ 3 - 1
apps/filebrowser/src/filebrowser/views.py

@@ -213,7 +213,9 @@ def download(request, path):
 
 def view(request, path):
   """Dispatches viewing of a path to either index() or fileview(), depending on type."""
-
+  # index directory have to be default.
+  if not path:
+    path = '/'
   path = _normalize_path(path)
 
   # default_abfs_home is set in jquery.filechooser.js