Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions application_sdk/activities/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ def get_object_store_prefix(path: str) -> str:
return relative_path.replace(os.path.sep, "/")
else:
# Path is already a relative object store path, return as-is
return path.strip("/")
return path.lstrip("/")
except ValueError:
# os.path.commonpath or os.path.relpath can raise ValueError on Windows with different drives
# In this case, treat as user-provided path, return as-is
return path.strip("/")
return path.lstrip("/")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Trailing slashes no longer removed from S3 paths

Changing from strip("/") to lstrip("/") removes only leading slashes instead of both leading and trailing slashes. This breaks the documented behavior shown in the example where "datasets/sales/2024/" should return "datasets/sales/2024". Paths with trailing slashes will now be preserved, potentially causing S3 prefix mismatches where paths like "prefix/" are treated differently than "prefix".

Fix in Cursor Fix in Web



def auto_heartbeater(fn: F) -> F:
Expand Down
Loading