}
}
- # If there is a command in the directive that doesn't require an actual
- # file to work on, we won't require the filename line in the directive
- # file. This will allow people to upload a directive file only to
- # archive/create symlinks/remove symlinks
- my $filename_required = 1;
-
- # There are a few possibilities regarding the 'filename' directive
- # 1. It exists in the directive file - there is no problem
- # 2. It doesn't exist in the directive file
- # In that case, we need to double check a few things.
- # This is permitted if the directive file contains commands that
- # don't require a filename - currently symlink, rmsymlink, and
- # archive - and only the directive file was uploaded
- if (!exists($info{filename})) {
- $filename_required = 0;
- }
+ # The above check that the directive contains at least one command
+ # ensures that we either have a filename or do not need one before we
+ # reach this point. This is temporarily kept as scaffolding.
+ my $filename_required = exists($info{filename});
if ($filename_required) {
# Ben Pfaff <blp@cs.stanford.edu> wrote: