Commit 8d7f3d7
committed
Fix a
If one of the course links that are now maintained by webwork points to
a location inside a non existent directory, then the `realpath` calls in
`lib/WeBWorK/Utils/CourseDirectoryIntegrityCheck.pm` throw exceptions.
This occurs both when checking for course upgrades and when upgrading
courses. So those calls are wrapped in evals to prevent the exceptions.
I have identified this as the cause of the issue discussed in
https://forums.openwebwork.org/mod/forum/discuss.php?d=8757#p22321.
To test this delete the Contrib link in a course's templates directory,
and create a bad link with something like
```bash
sudo ln -s /bad/location /opt/webwork/courses/courseId/templates/Contrib
```
Then go to the "Upgrade Courses" page in the admin course. It will give
an error with the current develop or main branches. With this pull
request it will show that the link structure of the course needs repair.
Furthermore, repairing the link will work.realpath failure when resolving course symlinks.1 parent bf93dca commit 8d7f3d7
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
0 commit comments