A trailing slash marks a directory in the queue, so the code would be harmful, but is fortunately used nowhere.
mentioned in commit 6d8f6f2a