Skip to content

Commit bc6b771

Browse files
authored
is_hidden: Use normalized paths (#271)
1 parent be38e52 commit bc6b771

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jupyter_core/paths.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,10 @@ def is_hidden(abs_path, abs_root=""):
384384
The absolute path of the root directory in which hidden directories
385385
should be checked for.
386386
"""
387-
if os.path.normpath(abs_path) == os.path.normpath(abs_root):
387+
abs_path = os.path.normpath(abs_path)
388+
abs_root = os.path.normpath(abs_root)
389+
390+
if abs_path == abs_root:
388391
return False
389392

390393
if is_file_hidden(abs_path):

0 commit comments

Comments
 (0)