summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <joreland@mysql.com>2005-05-26 21:30:26 +0200
committerunknown <joreland@mysql.com>2005-05-26 21:30:26 +0200
commitdf8e609b50aaf4b2eddf25c26294c6baaf0c0bda (patch)
tree13a9eeed3a0372cdd19687ff7283ba3308c2d4d0 /ndb
parentcf9c25d748514a05895c7b118eb542a543ad0822 (diff)
parentc8b88e8e45770ecae2233a5f9fb3dd2a32e17148 (diff)
downloadmariadb-git-df8e609b50aaf4b2eddf25c26294c6baaf0c0bda.tar.gz
Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/jonas/src/mysql-5.0
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/common/util/File.cpp26
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