diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-09-14 09:27:35 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-09-14 09:27:35 +0000 |
commit | bcc16a58c946b68a655aef2647659a027b6fe10b (patch) | |
tree | a50f6fb90dca564c5b72e51dbcecb6fa327d1c93 | |
parent | 92d94edd0c53665398fccb407770eb9e56545325 (diff) |
To check whether something is a directory, call "test_for_directory()"
on it and check whether it returned EISDIR, not whether it returns 0 -
EISDIR means it's a directory, 0 means it isn't.
svn path=/trunk/; revision=3939
-rw-r--r-- | epan/plugins.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/plugins.c b/epan/plugins.c index 2de2cdc9bd..9594fdcf01 100644 --- a/epan/plugins.c +++ b/epan/plugins.c @@ -1,7 +1,7 @@ /* plugins.c * plugin routines * - * $Id: plugins.c,v 1.33 2001/09/04 01:05:40 guy Exp $ + * $Id: plugins.c,v 1.34 2001/09/14 09:27:35 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -434,7 +434,7 @@ init_plugins(const char *plugin_dir) /* * Make sure that pathname refers to a directory. */ - if (test_for_directory(install_plugin_dir) != 0) { + if (test_for_directory(install_plugin_dir) != EISDIR) { /* * Either it doesn't refer to a directory or it * refers to something that doesn't exist. |