Skip to content

Fix ComputeSession().upload() creating malformed filenames when using relative paths with parent directory references #4530

Open
@seedspirit

Description

@seedspirit

Summary  

When using the upload() function with relative basedir paths containing parent directory references (e.g., ./, ../, ../../), the uploaded files have malformed names that include encoded directory traversal characters, making them difficult to identify and use.

!스크린샷 2025-05-28 오전 11.56.23.png|width=920,height=92,alt="스크린샷 2025-05-28 오전 11.56.23.png"!

Steps to Reproduce  

def test():
    with Session() as session:
        result = (session
                  .VFolder(name="test_folder")
                  .upload(sources=["manager.toml"]
                          ,basedir="../../")
        )
        print(result)


if __name__ == "__main__":
    test()

Expected Behavior  

  • Files should be uploaded with their original filenames regardless of the basedir used
  • Relative paths with parent directory references should be properly resolved without affecting the final filename

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions