summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authormonty@mysql.com <>2005-04-30 03:45:12 +0300
committermonty@mysql.com <>2005-04-30 03:45:12 +0300
commitaa84afb98374fab5012e9d0fa631f4fa09ede475 (patch)
tree04e7d5494ac5e82906a9d932fb8ae19502cb06c7 /mysys
parentfbf31c4a8c68419c689c52c031a98275755a0961 (diff)
parent4b9f462da72bf125f74d3640946607c9735e471f (diff)
downloadmariadb-git-aa84afb98374fab5012e9d0fa631f4fa09ede475.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
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
+ ;
+}