Tolerate trailing slashes on repository roots

[#59918120]
Merge 59918120- to master

[Completes #59918120]