From aa361baceeef1a593331c8d055373577eb34f32d Mon Sep 17 00:00:00 2001 From: mrzengel Date: Fri, 18 Oct 2024 14:57:17 -0500 Subject: [PATCH] testing with just os.getcwd --- zenodo_jupyterlab/server/handlers.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/zenodo_jupyterlab/server/handlers.py b/zenodo_jupyterlab/server/handlers.py index cd5dc36..7853d9e 100644 --- a/zenodo_jupyterlab/server/handlers.py +++ b/zenodo_jupyterlab/server/handlers.py @@ -68,8 +68,9 @@ class FileBrowserHandler(APIHandler): async def get(self): # Use the home directory as the root directory #root_dir = os.getenv("HOME") - relative_path = self.get_query_argument('path', '') - full_path = os.path.join(os.getcwd(), relative_path) + """ relative_path = self.get_query_argument('path', '') + full_path = os.path.join(os.getcwd(), relative_path) """ + full_path = os.getcwd() # Check if the directory exists if not os.path.isdir(full_path): @@ -171,7 +172,8 @@ async def post(self): class ServerInfoHandler(APIHandler): async def get(self): - home_dir = os.getenv("HOME") + #home_dir = os.getenv("HOME") + home_dir = os.getcwd() # Respond with the $HOME directory self.finish({'root_dir': home_dir})