fix(task) #16 ZipTask: only remove the leading files_base_path, read relative paths from the current directory - #20
Merged
Merged
Conversation
…he file paths, and reads the files at the given path when files_base_path is empty Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 30, 2026
njoubert-cleverage
added a commit
that referenced
this pull request
Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #16. Based on #19 (merge it first, this PR will then target
main).ZipTaskbuilt the archive entry names withstr_replace($files_base_path, '', $file)and always prefixed the read path withfiles_base_path.'/':files_base_pathwas removed, not only the leading one: a path containing it again was looked for at a wrong path (File does not exists);files_base_path, relative paths were resolved from the filesystem root.Changes:
ZipTask::execute(): removefiles_base_pathonly when the path starts with it followed by a directory separator (a trailing separator infiles_base_pathis ignored); other paths stay relative tofiles_base_path, as before. With an emptyfiles_base_path, read the file at the given path (absolute or relative to the current directory); the entry name is unchanged (the path without its leading/)ZipTaskTest: a path containingfiles_base_pathtwice, a relative path withoutfiles_base_path(both fail without the fix)zip_task.md: update thefilesoption and the notesChecked with
demo.archive.zip_files_base_path(entrydemo_zip_files_base_path/backup/var/data/archived_file.txt) anddemo.archive.zip_relative_path(entryvar/data/sample.txt) in process-bundle-demo: both failed withFile does not existsbefore.Requirements
Breaking changes
None: the affected configurations failed (
File does not exists) or added the wrong file. Absolute paths starting withfiles_base_path(once) and paths relative tofiles_base_pathbehave as before.🤖 Generated with Claude Code