Skip to content

Commit d6601dd

Browse files
committed
Fix the PG Problem Editor for files that have spaces in the filename.
The glob in the `getBackupTimes` method needs special quoting to handle spaces in filenames. To test this try to edit a pg problem with spaces in the filename. On develop the editor won't open, and you get an exception screen. With this pull request it will work of course.
1 parent e89ed66 commit d6601dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/WeBWorK/ContentGenerator/Instructor/PGProblemEditor.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ sub getFilePaths ($c) {
566566

567567
sub getBackupTimes ($c) {
568568
my $backupBasePath = $c->{backupBasePath};
569-
my @files = glob("$backupBasePath*");
569+
my @files = glob(qq("$backupBasePath*"));
570570
return unless @files;
571571
return reverse(map { $_ =~ s/$backupBasePath//r } @files);
572572
}

0 commit comments

Comments
 (0)