summaryrefslogtreecommitdiff
path: root/src/Fl_Preferences.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-05-15 19:45:38 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-05-15 19:45:38 +0000
commitcc89f57ccf970b47defd4f1f066110fbb6d20330 (patch)
tree083e613338602528a43497734b53e8c997d22c4c /src/Fl_Preferences.cxx
parent33f05fa72a6a33fc072963f0523a8a1951716c10 (diff)
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
Diffstat (limited to 'src/Fl_Preferences.cxx')
-rw-r--r--src/Fl_Preferences.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Fl_Preferences.cxx b/src/Fl_Preferences.cxx
index 4c305ccd0..863e7602c 100644
--- a/src/Fl_Preferences.cxx
+++ b/src/Fl_Preferences.cxx
@@ -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 $".
//