Преглед на файлове

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

Co-authored-by: kellyyke <kellyke@canva.com>
MeeseeksMachine преди 3 години
родител
ревизия
98bac81e3a
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  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')