summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-07-02 12:38:06 +0000
committerfukachan <fukachan>2002-07-02 12:38:06 +0000
commit4eca1f9cc8fa41413682ea970300e33d70a761df (patch)
tree73d17c73e1984d4c2718cdf60bb14b4c4dd1e837 /fml/lib/FML/Command
parent19c93c1a43b3623d3011f9e0bf2f44e93f102d67 (diff)
downloadfml8-4eca1f9cc8fa41413682ea970300e33d70a761df.tar.gz
fml8-4eca1f9cc8fa41413682ea970300e33d70a761df.tar.bz2
fml8-4eca1f9cc8fa41413682ea970300e33d70a761df.zip
check the existence of summary_file
send back the error message
Diffstat (limited to 'fml/lib/FML/Command')
-rw-r--r--fml/lib/FML/Command/User/summary.pm20
1 files changed, 15 insertions, 5 deletions
diff --git a/fml/lib/FML/Command/User/summary.pm b/fml/lib/FML/Command/User/summary.pm
index 28ad3154..f7e938c9 100644
--- a/fml/lib/FML/Command/User/summary.pm
+++ b/fml/lib/FML/Command/User/summary.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: summary.pm,v 1.7 2002/04/06 14:46:28 fukachan Exp $
+# $FML: summary.pm,v 1.8 2002/04/07 12:07:34 fukachan Exp $
#
package FML::Command::User::summary;
@@ -63,10 +63,20 @@ sub need_lock { 1;}
sub process
{
my ($self, $curproc, $command_args) = @_;
- my $config = $curproc->{ config };
-
- $command_args->{ _filepath_to_send } = $config->{ "summary_file" };
- $self->send_file($curproc, $command_args);
+ my $config = $curproc->{ config };
+ my $summary_file = $config->{ "summary_file" };
+
+ if (-f $summary_file) {
+ $command_args->{ _filepath_to_send } = $summary_file;
+ $self->send_file($curproc, $command_args);
+ }
+ else {
+ $curproc->reply_message_nl('error.no_such_file',
+ 'summary not found',
+ {
+ _arg_file => 'summary',
+ });
+ }
}