qdl: fix absolute image_path handling in sahara_config#198
Merged
andersson merged 2 commits intolinux-msm:masterfrom Mar 25, 2026
Merged
qdl: fix absolute image_path handling in sahara_config#198andersson merged 2 commits intolinux-msm:masterfrom
andersson merged 2 commits intolinux-msm:masterfrom
Conversation
igoropaniuk
reviewed
Mar 16, 2026
fe014c0 to
df17929
Compare
Add a cross-platform helper to test whether a path is absolute. On POSIX, a path starting with '/' is absolute. On Windows, absolute paths are either drive-letter paths (e.g. "C:\...") or UNC paths (e.g. "\\server\share"). Signed-off-by: Oleksandr Suvorov <cryosay@gmail.com>
Absolute image_path values in sahara_config XML were incorrectly treated as relative and prefixed with the XML file's base directory. For example, a Windows path "C:\programmer.elf" would become "./C:\programmer.elf". Use path_is_absolute() to detect and use absolute paths as-is, covering Windows drive-letter (e.g. "C:\...") and UNC paths (e.g. "\\server\share"), as well as POSIX paths starting with '/'. Signed-off-by: Oleksandr Suvorov <cryosay@gmail.com>
df17929 to
3fbe72e
Compare
Contributor
|
LGTM |
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.
This PR addresses the issue #191
When image_path in a sahara_config XML is a Windows absolute path (e.g. "C:\programmer.elf"), it was incorrectly prefixed with the XML file's base directory, producing a broken path like "./C:\programmer.elf".
Guard the Windows-specific absolute path handling with _WIN32 so that Linux behaviour is unchanged.