Skip to content

[APIM 4.6.0] Fix file path issue#1356

Merged
DDH13 merged 1 commit into
wso2:4.6.xfrom
DDH13:4.6.x.16462
May 13, 2026
Merged

[APIM 4.6.0] Fix file path issue#1356
DDH13 merged 1 commit into
wso2:4.6.xfrom
DDH13:4.6.x.16462

Conversation

@DDH13

@DDH13 DDH13 commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

Related to https://github.com/wso2-enterprise/wso2-apim-internal/issues/16462
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 27, 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: 535bd3d8-b8f1-4277-99b7-350033974230

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.

@DDH13 DDH13 changed the title Fix file path issue [APIM 4.6.0] Fix file path issue Apr 29, 2026
@DDH13 DDH13 merged commit c412b7d into wso2:4.6.x May 13, 2026
2 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.

3 participants