Skip to content

Commit

Permalink
Merge pull request #2571 from drgrice1/fix-valid-symlinks-option
Browse files Browse the repository at this point in the history
Fix the `$webworkDirs{valid_symlinks}` course environment option.
  • Loading branch information
somiaj committed Sep 18, 2024
2 parents 22496b8 + 253b646 commit 87dce1d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/WeBWorK/ContentGenerator/Instructor/FileManager.pm
Original file line number Diff line number Diff line change
Expand Up @@ -899,11 +899,11 @@ sub directoryListing ($c, $pwd) {
my $file = "$dir/$name";

my $type = 0;
$type |= 1 if -l $file; # Symbolic link
$type |= 2 if !-l $file && -d $file; # Directory
$type |= 4 if -f $file; # Regular file
$type |= 8 if -T $file; # Text file
$type |= 16 if $file =~ m/\.(gif|jpg|png)$/i; # Image file
$type |= 1 if $c->isSymLink($file); # Symbolic link
$type |= 2 if !$c->isSymLink($file) && -d $file; # Directory
$type |= 4 if -f $file; # Regular file
$type |= 8 if -T $file; # Text file
$type |= 16 if $file =~ m/\.(gif|jpg|png)$/i; # Image file

my $label = $name;
$label .= '@' if $type & 1;
Expand Down

0 comments on commit 87dce1d

Please sign in to comment.