| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #816
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 2 - Low, e.g. a documentation error or undocumented side-effect |
Scope: | 2 - Specific to an operating system |
Subsystem: | Core Library |
Summary: | fl_filename_relative returns wrong path when converting cwd |
Version: | 1.1.6 |
Created By: | bpittman |
Assigned To: | mike |
Fix Version: | 1.1-current (SVN: v4347) |
Update Notification: | |
Trouble Report Files:
No files
Trouble Report Comments:
|
#1 | bpittman 11:32 Apr 19, 2005 |
| In filename_absolute.cxx:fl_filename_relative, getcwd is used to check if the path being converted is the current working directory:
if (!getcwd(cwd, sizeof(cwd))) { strlcpy(to, from, tolen); return 0; }
#if defined(WIN32) || defined(__EMX__) if (!strcasecmp(from, cwd)) { strlcpy(to, ".", tolen); return (1); }
On Windows systems getcwd returns a path with back-slashes, so fl_filename_relative's strcmp of getcwd can fail if it is testing against a path with forward-slashes.
fl_filename_relative should convert the back-slashes to forward-slashes before comparing. | |
|
#2 | mike 13:27 Apr 19, 2005 |
|
| |
|
#3 | mike 20:19 May 12, 2005 |
| Fixed in Subversion repository. | |
[ Return to Bugs & Features ]
|
| |