Skip to content

Commit

Permalink
is_hidden: Use normalized paths (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Jun 22, 2022
1 parent be38e52 commit bc6b771
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jupyter_core/paths.py
Expand Up @@ -384,7 +384,10 @@ def is_hidden(abs_path, abs_root=""):
The absolute path of the root directory in which hidden directories
should be checked for.
"""
if os.path.normpath(abs_path) == os.path.normpath(abs_root):
abs_path = os.path.normpath(abs_path)
abs_root = os.path.normpath(abs_root)

if abs_path == abs_root:
return False

if is_file_hidden(abs_path):
Expand Down

0 comments on commit bc6b771

Please sign in to comment.