Strip leading slashes in blob path to resolve filenames properly
This bug was found while testing this PR. Steps to reproduce:
- Pick a repository with a
README.md
. - Go to the "Files" section
- Click on the "+" to create a new file
- In the filename field, type
README.md
. Then write a commit message and click on the "Commit Changes" button.
The file will be overwritten without warning, but it should have detected that the file existed and failed. The file path given to the Blob object was /README.md
, which failed to resolve properly due to #12.
Closes #12