diff --git a/obbrowser b/obbrowser index 620e1de..124bb6f 100755 --- a/obbrowser +++ b/obbrowser @@ -107,6 +107,7 @@ my $config_documentation = <<"EOD"; | browse_label : Label for "Browse here..." action. | start_path : An absolute path from which to start to browse the filesystem. | dirs_first : A true value will make the script to order directories before files. + | ignore_dotfiles : A true value will make the script to ignore files starting with a dot =cut @@ -119,6 +120,7 @@ my %CONFIG = ( dirs_first => 0, with_icons => 1, mime_ext_only => 0, + ignore_dotfiles => 0, icon_size => 48, force_icon_size => 0, generic_fallback => 1, @@ -227,7 +229,12 @@ my (%alias, %icons, @dirs, @files); opendir(my $dir_h, $path) or warn "$0: Can't open dir `$path': $!\n"; foreach my $file (readdir $dir_h) { - next if chr ord $file eq q{.}; # skip the hidden files + if ($CONFIG{ignore_dotfiles}) { + next if chr ord $file eq q{.}; # skip the hidden files + } + else { + next if $file eq q{.} or $file eq q{..}; # skip the hidden files + } if ($CONFIG{with_icons}) {