@@ -125,7 +125,7 @@ static int pgCompareString(const void *str1, const void *str2);
125125
126126static char dir_check_file (pgFile * file );
127127static void dir_list_file_internal (parray * files ,pgFile * parent ,bool exclude ,
128- bool follow_symlink ,
128+ bool follow_symlink ,bool skip_hidden ,
129129int external_dir_num ,fio_location location );
130130static void opt_path_map (ConfigOption * opt ,const char * arg ,
131131TablespaceList * list ,const char * type );
@@ -575,7 +575,7 @@ db_map_entry_free(void *entry)
575575 */
576576void
577577dir_list_file (parray * files ,const char * root ,bool exclude ,bool follow_symlink ,
578- bool add_root ,int external_dir_num ,fio_location location )
578+ bool add_root ,bool skip_hidden , int external_dir_num ,fio_location location )
579579{
580580pgFile * file ;
581581
@@ -601,7 +601,7 @@ dir_list_file(parray *files, const char *root, bool exclude, bool follow_symlink
601601if (add_root )
602602parray_append (files ,file );
603603
604- dir_list_file_internal (files ,file ,exclude ,follow_symlink ,
604+ dir_list_file_internal (files ,file ,exclude ,follow_symlink ,skip_hidden ,
605605external_dir_num ,location );
606606
607607if (!add_root )
@@ -821,7 +821,7 @@ dir_check_file(pgFile *file)
821821 */
822822static void
823823dir_list_file_internal (parray * files ,pgFile * parent ,bool exclude ,
824- bool follow_symlink ,
824+ bool follow_symlink ,bool skip_hidden ,
825825int external_dir_num ,fio_location location )
826826{
827827DIR * dir ;
@@ -868,7 +868,7 @@ dir_list_file_internal(parray *files, pgFile *parent, bool exclude,
868868}
869869
870870/* skip hidden files and directories */
871- if (file -> name [0 ]== '.' )
871+ if (skip_hidden && file -> name [0 ]== '.' )
872872{
873873elog (WARNING ,"Skip hidden file: '%s'" ,file -> path );
874874pgFileFree (file );
@@ -911,7 +911,7 @@ dir_list_file_internal(parray *files, pgFile *parent, bool exclude,
911911 */
912912if (S_ISDIR (file -> mode ))
913913dir_list_file_internal (files ,file ,exclude ,follow_symlink ,
914- external_dir_num ,location );
914+ skip_hidden , external_dir_num ,location );
915915}
916916
917917if (errno && errno != ENOENT )