Skip to content

Commit

Permalink
Urgent hotfix: Globus root
Browse files Browse the repository at this point in the history
  • Loading branch information
JBorrow committed Feb 19, 2025
1 parent 5bbdee1 commit bd8afb0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion hera_librarian/async_transfers/globus.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ def _subtract_local_root(path: Path, settings: "ServerSettings") -> Path:
"""
This is a helper function to finalize the remote path for a transfer.
"""
return path.relative_to(settings.globus_local_root)
if settings.globus_local_root is None:
return path
else:
return path.relative_to(settings.globus_local_root)

def authorize(self, settings: "ServerSettings"):
"""
Expand Down
2 changes: 1 addition & 1 deletion librarian_server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class ServerSettings(BaseSettings):
globus_client_id: str = ""
globus_client_native_app: bool = False
globus_local_endpoint_id: str = ""
globus_local_root: str = ""
globus_local_root: str | None = None

globus_client_secret: Optional[str] = None
globus_client_secret_file: Optional[Path] = None
Expand Down

0 comments on commit bd8afb0

Please sign in to comment.