--- loncom/publisher/lonpubdir.pm 2014/06/23 17:02:49 1.157 +++ loncom/publisher/lonpubdir.pm 2014/06/29 03:33:23 1.158 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Authoring Space Directory Lister # -# $Id: lonpubdir.pm,v 1.157 2014/06/23 17:02:49 raeburn Exp $ +# $Id: lonpubdir.pm,v 1.158 2014/06/29 03:33:23 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -100,7 +100,7 @@ sub handler { } my @files; if (opendir(DIR,$fn)) { - @files = readdir(DIR); + @files = grep(!/^\.+$/,readdir(DIR)); closedir(DIR); } else { $r->print('

'.&mt('Could not open directory.').'

'); @@ -126,8 +126,8 @@ sub handler { my $sortby = $env{'form.sortby'}; my $sortorder = $env{'form.sortorder'}; - if ((@files == 0) && ($thisdisfn =~ m{^/$match_domain/$match_username/priv})) { - if ($thisdisfn =~ m{^/$match_domain/$match_username/priv$}) { + if ((@files == 0) && ($thisdisfn =~ m{^/$match_domain/$match_username})) { + if ($thisdisfn =~ m{^/$match_domain/$match_username$}) { $r->print('

'.&mt('This Authoring Space is currently empty.').'

'); } else { $r->print('

'.&mt('This subdirectory is currently empty.').'

');