Browse Source

Backport PR #10662: Always check local packages against abspath (#12661)

Co-authored-by: Marc Udoff <marc.udoff@deshaw.com>
MeeseeksMachine 2 years ago
parent
commit
b05da6fae4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      jupyterlab/commands.py

+ 1 - 1
jupyterlab/commands.py

@@ -1363,7 +1363,7 @@ class _AppHandler(object):
         jlab = data["jupyterlab"]
 
         def format_path(path):
-            path = osp.relpath(path, pjoin(self.app_dir, "staging"))
+            path = osp.relpath(path, osp.abspath(osp.realpath(pjoin(self.app_dir, "staging"))))
             path = "file:" + path.replace(os.sep, "/")
             if os.name == "nt":
                 path = path.lower()