Commit 60a7d6a
authored
Fix normalisedSelectedNodes function (#4920)
The `normalisedSelectedNodes` function in `files_controller.go` had a
bug where it didn't work correctly for the root item (`/`). This PR
fixes that.
We don't have any tests for this bug. Apparently, the functions that use
this (staging and discarding files) also work correctly when they work
on a directory and then on the contained file again, that's why nobody
has noticed yet. I briefly looked into adding unit tests for the
function, but it was more work than I was willing to put into this right
now.1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1221 | 1221 | | |
1222 | 1222 | | |
1223 | 1223 | | |
| 1224 | + | |
| 1225 | + | |
1224 | 1226 | | |
1225 | 1227 | | |
1226 | 1228 | | |
1227 | 1229 | | |
1228 | 1230 | | |
1229 | | - | |
1230 | | - | |
| 1231 | + | |
1231 | 1232 | | |
1232 | 1233 | | |
1233 | 1234 | | |
| |||
0 commit comments