From a9ccdef489bec449b9b65ba8534b09e7364478e6 Mon Sep 17 00:00:00 2001 From: Mathis Rosenhauer Date: Fri, 18 May 2018 14:36:46 +0200 Subject: [PATCH] stat symlink to determine access --- notebook/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/utils.py b/notebook/utils.py index ea4a1a5ed..de1b3ea6f 100644 --- a/notebook/utils.py +++ b/notebook/utils.py @@ -140,7 +140,7 @@ def is_file_hidden_posix(abs_path, stat_res=None): if os.path.basename(abs_path).startswith('.'): return True - if stat_res is None: + if stat_res is None or stat.S_ISLNK(stat_res.st_mode): try: stat_res = os.stat(abs_path) except OSError as e: