diff options
author | ingo@mysql.com <> | 2005-04-28 18:34:47 +0200 |
---|---|---|
committer | ingo@mysql.com <> | 2005-04-28 18:34:47 +0200 |
commit | 8ccbea47e8550be6ea79454dca704938f69e1ec0 (patch) | |
tree | ea4115646abfd43ccb3b77d3f24440ae9d7b1f9c /mysys | |
parent | 286e204ac9d262dc7b1a357109307b915f8b1846 (diff) | |
parent | 1f0d0a6729690bfda6466130957393242d37cfe0 (diff) | |
download | mariadb-git-8ccbea47e8550be6ea79454dca704938f69e1ec0.tar.gz |
Merge mysql.com:/home/mydev/mysql-4.1-bug5964
into mysql.com:/home/mydev/mysql-4.1-4100
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_getwd.c | 22 |
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 + ; +} |