It is indeed solved, but this seems insufficient.
My point was that the behavior is unexpected, and error-prone. I myself had to spend a long time trying to figuring out what the issue was. Even if ones does not want to automatically convert the double slash into a single slash in some scenarios, I would expect to receive a warning, at least. The behavior goes against what any Linux user would expect, and it even modifies the string in an unexpected way (it trims the last characters).