← Back to issue list

pluginhandler: organize correcly for targets with leading /

View original Github issue

Metadata

Project
snapcraft
Number
#2034
Type
pull request
State
merged
Author
sergiusens
Labels
Created
Updated
Closed

Current evaluation

Merged fix for #1974 that strips leading slashes from organize keyword targets, ensuring correct os.path.join behavior for destination directories. Approved and passed CI.

Suggested action:

No scores available.

Issue body

Strip the leading / that can be part of a value for the organize keyword so that os.path.join can correctly join the destination directory for the organized file. Closes: #1974 Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com> - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [x] If this is a bugfix. Have you checked that there is a bug report open for the issue you are trying to fix on [bug reports](https://bugs.launchpad.net/snapcraft)? - [x] If this is a new feature. Have you discussed the design on the [forum](https://forum.snapcraft.io)? - [x] Have you successfully run `./runtests.sh static`? - [x] Have you successfully run `./runtests.sh unit`? -----

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged fix for #1974 that strips leading slashes from organize keyword targets, ensuring correct os.path.join behavior for destination directories. Approved and passed CI.
qwen3.6-35b-a3b-mtp-q6 Merged fix stripping leading slashes from the organize keyword's target paths, ensuring os.path.join correctly constructs destination directories. Closes #1974.
qwen3.6-35b-a3b-mtp-q6 Merged fix stripping leading slashes from organize keyword values to correct os.path.join destination directory resolution, closing issue #1974.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#2290 pluginhandler: update build should overwrite organize snapcraft merged Merged changes resolve LP: #1794083 by allowing organize to overwrite previously organized files when a part build step updates. Approved by one reviewer, passed CI, and achieved 100% diff coverage.
72%