FLTK logo

STR #816

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

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:

Receive EMails Don't Receive EMails

Trouble Report Files:

No files


Trouble Report Comments:


Name/Time/Date Text  
 
#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 ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.