diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2013-03-20 18:21:28 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2013-03-20 18:21:28 (GMT) |
commit | 59a9d9a0c67ea2a848a6aaad544db651a9fa4192 (patch) | |
tree | 7932a45a650c459c98013f0b61cfc3c72362a6b0 /src/H5PL.c | |
parent | 6563fc39b17543f01fd8e888774c43a75628737f (diff) | |
download | hdf5-59a9d9a0c67ea2a848a6aaad544db651a9fa4192.zip hdf5-59a9d9a0c67ea2a848a6aaad544db651a9fa4192.tar.gz hdf5-59a9d9a0c67ea2a848a6aaad544db651a9fa4192.tar.bz2 |
[svn-r23403] Refactor windows code:
windows uses ';' as path separator
windows default path is different
windows find files needs '*.*'
Diffstat (limited to 'src/H5PL.c')
-rw-r--r-- | src/H5PL.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -35,8 +35,6 @@ /* Local Macros */ /****************/ -#define H5PL_DEFAULT_PATH "/usr:/usr/lib:/usr/local" -#define H5PL_PATH_SEPARATOR ":" #define H5PL_MAX_PATH_NUM 16 /****************************/ @@ -45,6 +43,8 @@ /****************************/ /* Windows support */ #ifdef H5_HAVE_WIN32_API +#define H5PL_DEFAULT_PATH ".;/ProgramData;/Users/Public" +#define H5PL_PATH_SEPARATOR ";" /* Handle for dynamic library */ #define H5PL_HANDLE HINSTANCE @@ -77,6 +77,8 @@ ret_val = get_filter_info(); \ typedef const H5Z_class2_t *(__cdecl *get_filter_info_t)(); #else /* H5_HAVE_WIN32_API */ +#define H5PL_DEFAULT_PATH "/usr:/usr/lib:/usr/local" +#define H5PL_PATH_SEPARATOR ":" /* Handle for dynamic library */ #define H5PL_HANDLE void * @@ -425,10 +427,13 @@ H5PL__find(H5PL_type_t plugin_type, int type_id, char *dir, void **info) HANDLE hFind; char *pathname = NULL; htri_t ret_value = FALSE; + char service[2048]; FUNC_ENTER_STATIC - if((hFind = FindFirstFile(dir, &fdFile)) == INVALID_HANDLE_VALUE) + /* Specify a file mask. *.* = We want everything! */ + sprintf(service, "%s*.*", dir); + if((hFind = FindFirstFile(service, &fdFile)) == INVALID_HANDLE_VALUE) HGOTO_ERROR(H5E_PLUGIN, H5E_OPENERROR, FAIL, "can't open directory") do { |