Filename Function not working correctly

I think I found a bug using the Filename function. If you have a filename with two or more periods in the file name, then the Filename function doesn’t return only the filename. For example, consider the scenario of having two files named as follows: File1.txt and File2.txt.txt

When you use the Filename function on File1.txt, it returns File1. But when you use the Filename function on File2.txt.txt, it returns File2.txt which isn’t the file name. Took me a while to determine the exact scenario that was causing my morph to not work correctly. My morph logic was expecting the filename to be returned as it was.

I’ve included a simple morph to illustrate this.
FileNameBug.morph (3.2 KB)

In Windows the file extension is the characters after the last dot, not the first dot. Therefore, for the file name File2.txt.txt:

File2.txt - file name
.txt - extension