Closed schneems closed 1 year ago
It’s valid to have a : in your file name so taking the first segment isn’t guaranteed to produce a valid file.
You should pop the last element and rejoin with “:” instead.
it’s not the exact same case but I had similar issues with https://github.com/ruby/syntax_suggest/blob/main/lib/syntax_suggest/pathname_from_message.rb in which case I checked for existence of a file or dir first.
Thank goodness ❤️
I wonder how many gems are out there exploiting this flaw. Well, their time has finally arrived bastards!!!
It’s valid to have a : in your file name so taking the first segment isn’t guaranteed to produce a valid file.
You should pop the last element and rejoin with “:” instead.
it’s not the exact same case but I had similar issues with https://github.com/ruby/syntax_suggest/blob/main/lib/syntax_suggest/pathname_from_message.rb in which case I checked for existence of a file or dir first.