Closed katiefaith closed 2 years ago
You could go one better and exclude /
s from the match, so as not to truncate a path with a .
if the filename has no extension (although it's unlikely to arise in practice).
Looks ok, not had chance to try this yet though
@pelwell good point. I updated the regex to [^./] to deal with that problem.
Thanks!
Previously, relative paths would confuse the file name generation regex. With this change, only the final '.' character is matched as the beginning of the file extension.