diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2006-02-08 00:06:38 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2006-02-08 00:06:38 +0000 |
commit | 007796b156d2566dcdd23a6f52d3d28f69336fc0 (patch) | |
tree | d5764f78422990b7e9e3e7283236fdaf55605ede /epan | |
parent | afa7c90487b48880b0abe3af9d5d66862200c004 (diff) |
Make file_exists() work on macosx (and other unices)
svn path=/trunk/; revision=17211
Diffstat (limited to 'epan')
-rw-r--r-- | epan/filesystem.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/epan/filesystem.c b/epan/filesystem.c index 129221a3af..1180973c3c 100644 --- a/epan/filesystem.c +++ b/epan/filesystem.c @@ -756,6 +756,7 @@ file_exists(const char *fname) struct stat file_stat; +#ifdef _WIN32 /* * This is a bit tricky on win32. The st_ino field is documented as: * "The inode, and therefore st_ino, has no meaning in the FAT, ..." @@ -769,7 +770,14 @@ file_exists(const char *fname) } else { return FALSE; } - +#else + if (eth_stat(fname, &file_stat) != 0 && errno == ENOENT) { + return FALSE; + } else { + return TRUE; + } +#endif + } |