# if the symlink already exists, remove it
if (-l $abslinkname) {
unlink $abslinkname
- or fatal("removal of symlink $linkname failed: $!",1);
+ or throw processing_error => command => $step,
+ summary => "removal of symlink $linkname failed: $!";
}
# symlink away!
symlink $target, $abslinkname
- or fatal("creation of symlink $linkname "
- ."to $target in $header->{directory} failed: $!",1);
+ or throw processing_error => command => $step,
+ summary => "creation of symlink $linkname "
+ ."to $target in $header->{directory} failed: $!";
ftp_syslog('info', "added symlink $linkname pointing to "
."$target in $header->{directory}");
} elsif ($step->[0] eq 'rmsymlink') {
my $abslinkname =
File::Spec->catfile($Public_dir, @directory, $step->[1]);
- fatal("refusing to remove a non-symlink file",1)
- unless -l $abslinkname;
+ throw processing_error => command => $step,
+ summary => "refusing to remove a non-symlink file"
+ unless -l $abslinkname;
unlink $abslinkname
- or fatal("removal of symlink $step->[1] failed: $!",1);
+ or throw processing_error => command => $step,
+ summary => "removal of symlink $step->[1] failed: $!";
ftp_syslog('info', "removed symlink $step->[1] in $header->{directory}");
} elsif ($step->[0] eq 'archive') {
# We now also allow archiving entire directories