From: Errietta Kostala Date: Wed, 27 Aug 2014 16:16:02 +0000 (+0100) Subject: Check -f $file instead X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1b95b119ea619d1a43248d7be8a6823e3e8658e0;p=scpubgit%2FApp-SCS.git Check -f $file instead --- diff --git a/lib/App/SCS/PageSet.pm b/lib/App/SCS/PageSet.pm index 5de5f7c..fb61a40 100644 --- a/lib/App/SCS/PageSet.pm +++ b/lib/App/SCS/PageSet.pm @@ -66,7 +66,7 @@ sub _config_files_for { my @dir_parts = io->dir($path)->splitdir; my @dirs = map io->dir('')->catdir(@dir_parts[1..$_]), 1..($#dir_parts - 1); - return grep +($_->is_file and $_->exists and not $_->empty), + return grep +(-f $_->name and not $_->empty), map $self->_top_dir->catfile("${_}.conf"), @dirs; }