From 73bf317dd11cf3a27fdd8f0225ad0f14454b9fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Krassowski?= <5832902+krassowski@users.noreply.github.com> Date: Sun, 11 Sep 2022 18:33:47 +0100 Subject: [PATCH] Normalise `os_path` Port of https://github.com/jupyter-server/jupyter_server/pull/886 --- notebook/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebook/utils.py b/notebook/utils.py index f7b6380df..8b3ca4b7b 100644 --- a/notebook/utils.py +++ b/notebook/utils.py @@ -253,7 +253,7 @@ def to_os_path(path, root=''): parts = path.strip('/').split('/') parts = [p for p in parts if p != ''] # remove duplicate splits path = os.path.join(root, *parts) - return path + return os.path.normpath(path) def to_api_path(os_path, root=''): """Convert a filesystem path to an API path