I fixed a bug in some ftp server code that seemed like a simple, "quick win" fix.
This then highlighted an, er, "undocumented feature" when working in conjunction with a specific ftp client who's behaviour is beyond what the relevant RFCs say, i.e. my solution does not voilate any relevant RFCs.
I then patched the patch to correct the behaviour but my fix(es) still bug me. I'm thinking that I should've seen that the original "quick win" fix in fact wasn't.
Looking back now I see that the patch to the patch was me possibly ignoring the fact that I didn't realise that I was digging myself deeper and deeper into a hole, trying to justify my original patch if you will.
Now, the patched, patched code works fine but I still can't help but thinking that I should go back and fix the original problem with a better solution.
Is going back to fix that now just ego? Or are there cases where looking at the future maintainability justifies the extra work involved?
How do I sell this to management? Maybe just wait and see if another bug is found?