Skip to content

[APIM 4.2.0] Fix file path issue#1354

Merged
RakhithaRR merged 1 commit into
wso2:4.2.xfrom
DDH13:4.2.x.16356
Apr 26, 2026
Merged

[APIM 4.2.0] Fix file path issue#1354
RakhithaRR merged 1 commit into
wso2:4.2.xfrom
DDH13:4.2.x.16356

Conversation

@DDH13

@DDH13 DDH13 commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Related to https://github.com/wso2-enterprise/wso2-apim-internal/issues/16356
This pull request improves cross-platform compatibility and file handling in the CLI by making file path operations platform-independent and addressing potential file locking issues on Windows. The changes focus on using the appropriate standard library functions for path operations and ensuring temporary files are properly closed before use.

Cross-platform file path handling:

  • Replaced manual string splitting with filepath.Base in importAPIPolicy.go to reliably extract the file name from a path, making the code platform-independent.

Temporary file handling improvements:

  • Updated CreateZipFileFromProject in fileIOUtils.go to close the temporary file before zipping to avoid file locking issues on Windows, and consistently use the temporary file path variable for cleanup and logging.

@coderabbitai

coderabbitai Bot commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4527172e-b0ec-46f8-8d4b-a99cb39169ca

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@RakhithaRR
RakhithaRR merged commit 81f9a7c into wso2:4.2.x Apr 26, 2026
2 checks passed
@O-sura O-sura added the 4.2.8 Label for patch release 4.2.8 label Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.2.8 Label for patch release 4.2.8

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants