Use access() instead of stat() to determine if the directory exists.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2228 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet 2002-05-15 19:45:38 +00:00
parent 33f05fa72a
commit cc89f57ccf
2 changed files with 7 additions and 8 deletions

View File

@ -1,5 +1,8 @@
CHANGES IN FLTK 1.1.0
- Fl_Preferences::makePath() now uses access() instead
of stat() when checking to see if the destination
directory already exists.
- Fl_BMP_Image now supports older BMP files with the 12
byte header.
- Optimized the redrawing of tabs and radio/check

View File

@ -1,5 +1,5 @@
//
// "$Id: Fl_Preferences.cxx,v 1.1.2.10 2002/05/03 20:30:19 easysw Exp $"
// "$Id: Fl_Preferences.cxx,v 1.1.2.11 2002/05/15 19:45:38 easysw Exp $"
//
// Preferences methods for the Fast Light Tool Kit (FLTK).
//
@ -580,12 +580,8 @@ Fl_Preferences::Name::~Name()
int Fl_Preferences::Node::lastEntrySet = -1;
// recursively create a path in the file system
static char makePath( const char *path )
{
struct stat stats;
int ret = stat( path, &stats );
if ( ret )
{
static char makePath( const char *path ) {
if (access(path, 0)) {
const char *s = strrchr( path, '/' );
if ( !s ) return 0;
int len = s-path;
@ -1084,5 +1080,5 @@ char Fl_Preferences::Node::remove()
//
// End of "$Id: Fl_Preferences.cxx,v 1.1.2.10 2002/05/03 20:30:19 easysw Exp $".
// End of "$Id: Fl_Preferences.cxx,v 1.1.2.11 2002/05/15 19:45:38 easysw Exp $".
//