Skip to content

Commit

Permalink
Fix the $webworkDirs{valid_symlinks} course environment option.
Browse files Browse the repository at this point in the history
This was broken in the recent rewrite of the file manager.  Any symlink
to a directory listed in the `$webworkDirs{valid_symlinks}` array should
be allowed to be followed.  This is a quick fix that makes those
symlinks look and behave like they are actually directories in the file
manager.
  • Loading branch information
drgrice1 committed Sep 10, 2024
1 parent 72fc97e commit 253b646
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 253b646

Please sign in to comment.