Commit 46ee11a
committed
Fix Path:find_upwards()
The prior implementation had several implementation issues which caused
an infinite loop if the search turned up empty.
This new implementation corrects the bounds check to stop searching once
we've searched everywhere we can, and properly searches the root
directory1 parent 102c029 commit 46ee11a
1 file changed
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
| |||
917 | 921 | | |
918 | 922 | | |
919 | 923 | | |
920 | | - | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
921 | 927 | | |
922 | 928 | | |
923 | 929 | | |
924 | 930 | | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
925 | 934 | | |
926 | 935 | | |
927 | | - | |
| 936 | + | |
| 937 | + | |
928 | 938 | | |
929 | 939 | | |
930 | 940 | | |
0 commit comments