fix: handle paths on different drives in Windows for zap-gui#597
Merged
ArekBalysNordic merged 1 commit intoMay 9, 2025
Conversation
|
none Note: This comment is automatically posted and updated by the Contribs GitHub Action. |
kkasperczyk-no
approved these changes
Apr 24, 2025
Contributor
kkasperczyk-no
left a comment
There was a problem hiding this comment.
LGTM 👍 Thank you for the contribution!
Member
|
Hi @WangHunZi, you have to sign Contributor License Agreement before we can merge this. Please force push to this PR to trigger the CLAassistant. |
Signed-off-by: wanower <suguguan@qq.com>
Contributor
Author
Hi @adigie , thank you for the reminder! I've signed the CLA and addressed the requested changes. Could you please help approve the pending workflows so we can proceed? Let me know if there's anything else I need to do. Thanks again for your assistance! |
ArekBalysNordic
approved these changes
May 9, 2025
ArekBalysNordic
pushed a commit
to ArekBalysNordic/sdk-connectedhomeip
that referenced
this pull request
Oct 27, 2025
* [SL-UP] Updating the performance profile API to v2 (nrfconnect#639) * [SL-UP] Adds improvements on the join and scan logic based on WiseConnect feedback (nrfconnect#596) Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Mathieu Kardous <84793247+mkardous-silabs@users.noreply.github.com> * [SL-UP] Custom board part build fix (nrfconnect#597) * [SL-UP] Rejoin fix after power cycle for sleepy 917 devices * Fix matter_shell include path argument * [SL-UP] Adding the changes for the Wi-Fi which were done after the merge (nrfconnect#569) Co-authored-by: Mathieu Kardous <84793247+mkardous-silabs@users.noreply.github.com> * [SL-UP] Revert the Task priorities for the 917SoC (nrfconnect#538) * [SL-UP] Rejoin fix after power cycle for sleepy 917 devices * [SL-UP] Add an implementation of GetOtaTlvEncryptionKeyId * fix typo --------- Co-authored-by: chirag-silabs <100861685+chirag-silabs@users.noreply.github.com> Co-authored-by: Rohan Sahay <103027015+rosahay-silabs@users.noreply.github.com> Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: chirag-silabs <chirag.bansal@silabs.com>
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.
Fix zap-gui path handling on Windows systems with different drives
Issue
When using
west zap-guion Windows, if the ZAP file and any of the required files (ZCL or app templates) are located on different drives, the command fails with:ValueError: 'c:\\ncs\\v3.0.0-rc1\\modules\\lib\\matter\\src\\app\\zap-templates\\zcl\\zcl.json' and 'D:\\Code\\project\\src\\default_zap' have different anchorsThis occurs because
pathlib.Path.relative_to()method cannot compute relative paths between different drives in Windows. The issue happens in both scenarios:-joption, if app-templates.json remains on a different driveRoot cause
In
update_zcl_in_zap()function, the code attempts to calculate relative paths usingrelative_to()but doesn't handle the case when paths are on different drives in Windows.Solution
This PR fixes the issue by:
relative_to()is calledThis ensures that
west zap-guiworks correctly on Windows regardless of drive locations while maintaining the original behavior on Linux and macOS.Testing
Tested on Windows 11 with:
-joptionThe fix also works correctly on Linux as before, where this issue doesn't occur.