Log in

No account? Create an account
Bill Roper's Journal
Old Bugs, Old Bugs 
13th-Feb-2017 11:25 pm
There is nothing like finding a really old bug in the code.

Today, someone sent me a file and said, "This won't open. It doesn't open in the older version either."

I tried opening the file and discovered that they were correct. Hmm. I opened up the file in an editor just to check and make sure that it was, in general, correctly formatted, which it was. Of course, there could be something more subtle wrong.

Nope, nothing subtle about it at all.

Someone had once -- and against my advice -- put in a check for the specific file extension that we use for our files to solve a particular problem that they were dealing with. That obviously wasn't the problem here, because the file had the correct extension.

In ALL CAPS. Darned shame that whoever was checking for the extension had written code that checked for the extension in all lower case.

The comparison is now case-insensitive.

And the very old bug has gone away.
14th-Feb-2017 07:10 am (UTC)
The eternal question: how could a bug this stupid have been around for this long?
14th-Feb-2017 07:04 pm (UTC)
Maybe the person writing the code was from a Unix/Linux background where file names *are* case sensitive.
This page was loaded Dec 17th 2018, 4:54 am GMT.