When uploading an asset, if a filename collision is detected, the new generated name is not correct

For example, If you already have a file uploaded called test.jpg, and you upload another file called test.jpg at the same location, the system will name the second file test.jpg-1. Instead, it should name it test-1.jpg. This problem does not create an error or anything, but it should be fixed for absolute url correctness.