summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2005-04-28 19:34:05 +0200
committerunknown <ingo@mysql.com>2005-04-28 19:34:05 +0200
commit45031a44546e1bf0092c9ddcde6b56d7357f3903 (patch)
tree4e65f44049751fec4d3ff85e114155f9fe894035 /mysys
parent745d52bb3da3afb018061b4e3ec34420a8475389 (diff)
parent275c8e77907791f62ed334d9cafaba8d734a4d33 (diff)
downloadmariadb-git-45031a44546e1bf0092c9ddcde6b56d7357f3903.tar.gz
Merge mysql.com:/home/mydev/mysql-4.1-4100
into mysql.com:/home/mydev/mysql-5.0-5000 include/my_sys.h: Auto merged myisam/myisampack.c: Auto merged sql/ha_myisammrg.cc: Auto merged
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_getwd.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysys/my_getwd.c b/mysys/my_getwd.c
index d6f647254e8..89f949eca27 100644
--- a/mysys/my_getwd.c
+++ b/mysys/my_getwd.c
@@ -192,3 +192,25 @@ int test_if_hard_path(register const char *dir_name)
return FALSE;
#endif
} /* test_if_hard_path */
+
+
+/*
+ Test if a name contains an (absolute or relative) path.
+
+ SYNOPSIS
+ has_path()
+ name The name to test.
+
+ RETURN
+ TRUE name contains a path.
+ FALSE name does not contain a path.
+*/
+
+my_bool has_path(const char *name)
+{
+ return test(strchr(name, FN_LIBCHAR))
+#ifdef FN_DEVCHAR
+ || test(strchr(name, FN_DEVCHAR))
+#endif
+ ;
+}