Skip to content

Commit

Permalink
testing with just os.getcwd
Browse files Browse the repository at this point in the history
  • Loading branch information
mrzengel committed Oct 18, 2024
1 parent 2d8be04 commit aa361ba
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions zenodo_jupyterlab/server/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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})

Expand Down

0 comments on commit aa361ba

Please sign in to comment.