Replace slashes with dashes to avoid 422 errors #131

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
1 participant

mfilej commented Feb 23, 2013

When gisting a file from a subdirectory, e.g.:

$ gist dir/file.txt

the gist API will return a 422 error, because it doesn't like slashes in filenames.

This patch makes sure slashes are converted to dashes. I chose this solution over something like File.basename so that files with the same name from different subdirectories can still be gisted at the same time.

@mfilej mfilej Replace slashes with dashes to avoid 422 errors
When gisting a file from a subdirectory, e.g.:

    $ gist dir/file.txt

the gist API will return a 422 error, because it doesn't like slashes in
filenames.
543c46f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment