##// END OF EJS Templates
use ContentManagers own is_hidden() function
Manuel Riel -
Show More
@@ -22,7 +22,6 b' try:'
22 except ImportError:
22 except ImportError:
23 app_log = logging.getLogger()
23 app_log = logging.getLogger()
24
24
25 from IPython.html.utils import is_hidden
26 from IPython.html.base.handlers import IPythonHandler
25 from IPython.html.base.handlers import IPythonHandler
27
26
28 class FilesHandler(IPythonHandler):
27 class FilesHandler(IPythonHandler):
@@ -32,7 +31,7 b' class FilesHandler(IPythonHandler):'
32 def get(self, path):
31 def get(self, path):
33 cm = self.settings['contents_manager']
32 cm = self.settings['contents_manager']
34 abs_path = os.path.join(cm.root_dir, path)
33 abs_path = os.path.join(cm.root_dir, path)
35 if is_hidden(abs_path):
34 if cm.is_hidden(abs_path):
36 self.log.info("Refusing to serve hidden file, via 404 Error")
35 self.log.info("Refusing to serve hidden file, via 404 Error")
37 raise web.HTTPError(404)
36 raise web.HTTPError(404)
38
37
General Comments 0
You need to be logged in to leave comments. Login now