Commit 8012d36
authored
fortune: bad assumption in find_path()
* This version of fortune can be passed a file argument, which will be used as the fortune file
* In find_path(), if the direct path check fails a loop is entered where the file argument is appended to each search directory
* When the file argument is an absolute path, entering this loop is incorrect because the absolute path will be prefixed with the search directory path
* fortune's debug (-d) option makes the file search easy to see
* While here, use catfile() to join relative paths with the search directory1 parent 8d0d173 commit 8012d36
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
235 | | - | |
236 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
237 | 241 | | |
238 | 242 | | |
239 | 243 | | |
| |||
0 commit comments