diff --git a/jupyter_server/serverapp.py b/jupyter_server/serverapp.py index 028344f7d9..1ee4cf64b4 100644 --- a/jupyter_server/serverapp.py +++ b/jupyter_server/serverapp.py @@ -2539,9 +2539,9 @@ def _resolve_file_to_run_and_root_dir(self): is configured, root_dir will be set to the parent directory of file_to_run. """ - rootdir_abspath = pathlib.Path(self.root_dir).resolve() + rootdir_abspath = pathlib.Path(self.root_dir).absolute() file_rawpath = pathlib.Path(self.file_to_run) - combined_path = (rootdir_abspath / file_rawpath).resolve() + combined_path = (rootdir_abspath / file_rawpath).absolute() is_child = str(combined_path).startswith(str(rootdir_abspath)) if is_child: