Bläddra i källkod

Backport PR #12024: use path-like comparison in initialize_templates() (#12038)

Co-authored-by: kellyyke <kellyke@canva.com>
MeeseeksMachine 3 år sedan
förälder
incheckning
98bac81e3a
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      jupyterlab/labapp.py

+ 2 - 2
jupyterlab/labapp.py

@@ -550,11 +550,11 @@ class LabApp(NBClassicConfigShimMixin, LabServerApp):
 
     def initialize_templates(self):
         # Determine which model to run JupyterLab
-        if self.core_mode or self.app_dir.startswith(HERE):
+        if self.core_mode or self.app_dir.startswith(HERE + os.sep):
             self.core_mode = True
             self.log.info('Running JupyterLab in core mode')
 
-        if self.dev_mode or self.app_dir.startswith(DEV_DIR):
+        if self.dev_mode or self.app_dir.startswith(DEV_DIR + os.sep):
             self.dev_mode = True
             self.log.info('Running JupyterLab in dev mode')