Skip to content

Fix combine tmt path - #315

Merged
pellecchialuigi merged 2 commits into
mainfrom
fix-combine-tmt-path
Aug 27, 2026
Merged

Fix combine tmt path#315
pellecchialuigi merged 2 commits into
mainfrom
fix-combine-tmt-path

Conversation

@pellecchialuigi

@pellecchialuigi pellecchialuigi commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

solves #316

…iles

Selecting a user file in Edit Test Case sent repository as the BASIL root
and relative-path as /api/user-files/<id>/..., which starts with a slash.
os.path.join treated that as absolute, dropped the repository, and the
local-file safety check rejected /api/user-files/... with HTTP 400.

Join repository and relative path through combine_tmt_path() everywhere a
TMT filesystem path is built, and split user-file paths in the UI through
splitUserFileToTmtPath(). Cover the join on API, Test Specification, and
Software Requirement mappings, plus E2E add/edit from user files.

Signed-off-by: Luigi Pellecchia <pellecchia.luigi@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@pellecchialuigi
pellecchialuigi marked this pull request as ready for review August 27, 2026 10:28
@pellecchialuigi
pellecchialuigi merged commit 02d37e2 into main Aug 27, 2026
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant