Opened 9 years ago
Closed 9 years ago
#14800 closed defect (fixed)
[cla][patch] absolute path given for profile failes on windows
Reported by: | Rawld Gill | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | high | Milestone: | 1.7.2 |
Component: | BuildSystem | Version: | 1.7.2rc1 |
Keywords: | Cc: | cjolif | |
Blocked By: | Blocking: |
Description
works OK on *nix, but windows path normalization appears to fail; particularly if there is a drive letter in the path
Attachments (1)
Change History (8)
comment:1 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|---|
Priority: | undecided → high |
Status: | new → assigned |
comment:2 Changed 9 years ago by
Cc: | cjolif added |
---|
Changed 9 years ago by
Attachment: | 14800.patch added |
---|
comment:3 Changed 9 years ago by
Here is a possible patch. The patch is very simple but review more than welcome... The problem I found is that getAbsolutePath() function (fileUtils.js) does not take into account the Windows filesystem syntax when checking whether it's an absolute path or not. This result in concatanating the base path with the given filename (which is absolute), giving something like: c:/a/path/to/buildscript/c:/a/path/to/the/file.profile
Indeed:
getAbsolutePath= function(src, base) { src= cleanupPath(src); if (src.charAt(0)!="/") { //////////// <<<<< UNIX-only !!! src= catPath(base, src); } return compactPath(src); },
Instead, it should check the path using the isAbsolutePath function :
getAbsolutePath= function(src, base) { src= cleanupPath(src); if (!isAbsolutePath(src)) { src= catPath(base, src); } return compactPath(src); },
comment:4 Changed 9 years ago by
Milestone: | 1.8 → 1.7.2 |
---|
rcgill, if Patrick's patch is ok with you, can Patrick (or you) commit it in 1.7.2? Or at least in 1.7.3? Thanks.
comment:5 Changed 9 years ago by
Summary: | absolute path given for profile failes on windows → [cla][patch] absolute path given for profile failes on windows |
---|
patch by Patrick Ruzand (IBM, CCLA)