Changeset 4758
- Timestamp:
- 05/12/07 02:52:20 (1 year ago)
- Files:
-
- wire/trunk/wire/files.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wire/trunk/wire/files.c
r4577 r4758 185 185 wi_array_t * wr_files_full_paths(wi_array_t *paths) { 186 186 wi_enumerator_t *enumerator, *glob_enumerator; 187 wi_array_t *array ;187 wi_array_t *array, *globpaths; 188 188 wi_string_t *path, *globpath; 189 189 … … 192 192 193 193 while((path = wi_enumerator_next_data(enumerator))) { 194 glob _enumerator = wi_array_data_enumerator(wr_files_glob(path));194 globpaths = wr_files_glob(path); 195 195 196 while((globpath = wi_enumerator_next_data(glob_enumerator))) 197 wi_array_add_data(array, wr_files_full_path(globpath)); 196 if(globpaths) { 197 glob_enumerator = wi_array_data_enumerator(wr_files_glob(path)); 198 199 while((globpath = wi_enumerator_next_data(glob_enumerator))) 200 wi_array_add_data(array, wr_files_full_path(globpath)); 201 } 198 202 } 199 203 … … 263 267 glob_t gl; 264 268 wi_uinteger_t i; 269 int status; 265 270 266 271 gl.gl_opendir = wr_files_glob_opendir; … … 270 275 gl.gl_stat = wr_files_glob_stat; 271 276 272 if(glob(wi_string_cstring(pattern), GLOB_ALTDIRFUNC, NULL, &gl) != 0) { 273 wr_printf_prefix(WI_STR("glob: %m")); 277 status = glob(wi_string_cstring(pattern), GLOB_NOCHECK | GLOB_ALTDIRFUNC , NULL, &gl); 278 279 if(status != 0) { 280 wr_printf_prefix(WI_STR("glob: %s"), strerror(errno)); 274 281 275 282 return NULL;
