* strip trailing path separator from type=dir sources (cherry picked from commit 964e678a7f)
964e678a7f