Prechádzať zdrojové kódy

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

Akhil S Naik 4 rokov pred
rodič
commit
c5a44c6adb
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  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