MantisBT - CMake | |||||
| View Issue Details | |||||
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0014193 | CMake | CMake | public | 2013-06-04 01:54 | 2013-11-04 09:33 |
| Reporter | Yichao Yu | ||||
| Assigned To | |||||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | won't fix | ||
| Platform | Linux | OS | Arch Linux | OS Version | |
| Product Version | CMake 2.8.11 | ||||
| Target Version | Fixed in Version | ||||
| Summary | 0014193: get_filename_component(ABSOLUTE) doesn't remove multiple leading / | ||||
| Description | When given a path with multiple leading /'s, get_filename_component returns a filename with two leading /'s. Although this behavior is consistent with how cd set PWD (see 8.c of cd(1)[1]), it doesn't consistent with realpath(1) and realpath(3). And it also makes it harder to use this absolute path as an unique identifier of the file directly. Non-posix shell like zsh(1) also removes multiple leading /'s in PWD and I personally don't see any advantage of not removing them. The same thing applies to get_filename_component(REALPATH) when a not-yet-exists path is given. (probably related to 0014192.) [1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html [^] | ||||
| Steps To Reproduce | get_filename_component(abs_path "//lib" ABSOLUTE) message("${abs_path}") expected output: /lib actual output: //lib | ||||
| Additional Information | |||||
| Tags | No tags attached. | ||||
| Relationships | |||||
| Attached Files | |||||
| Issue History | |||||
| Date Modified | Username | Field | Change | ||
| 2013-06-04 01:54 | Yichao Yu | New Issue | |||
| 2013-06-04 08:08 | Brad King | Note Added: 0033222 | |||
| 2013-06-04 08:08 | Brad King | Status | new => resolved | ||
| 2013-06-04 08:08 | Brad King | Resolution | open => won't fix | ||
| 2013-11-04 09:33 | Robert Maynard | Note Added: 0034360 | |||
| 2013-11-04 09:33 | Robert Maynard | Status | resolved => closed | ||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||