diff options
author | unknown <joreland@mysql.com> | 2005-05-25 09:26:59 +0200 |
---|---|---|
committer | unknown <joreland@mysql.com> | 2005-05-25 09:26:59 +0200 |
commit | 0c7cb42688665735093cbe4542cd11dd8fa15e57 (patch) | |
tree | 649c936c843f96972e40980116ed425c4e55c30e /ndb | |
parent | e14d6f80f2d3cb5e9491326b80827fc02a871857 (diff) | |
parent | 605f7061dc2ca28d78ad652b9b5a7225f55ccb9a (diff) | |
download | mariadb-git-0c7cb42688665735093cbe4542cd11dd8fa15e57.tar.gz |
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/common/util/File.cpp | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/ndb/src/common/util/File.cpp b/ndb/src/common/util/File.cpp index 937b8c0fa59..e514ad8e122 100644 --- a/ndb/src/common/util/File.cpp +++ b/ndb/src/common/util/File.cpp @@ -28,29 +28,9 @@ bool File_class::exists(const char* aFileName) { - bool rc = true; -#ifdef USE_MY_STAT_STRUCT - struct my_stat stmp; -#else - struct stat stmp; -#endif - if (my_stat(aFileName, &stmp, MYF(0)) != 0) - { - rc = false; - } - - /* - File f; - if (!f.open(aFileName, "r")) - { - rc = (errno == ENOENT ? false : true); - } - else - { - f.close(); - } - */ - return rc; + MY_STAT stmp; + + return (my_stat(aFileName, &stmp, MYF(0))!=NULL); } long |