Comment 13 for bug 538219

Revision history for this message
Karl Fogel (kfogel) wrote :

No, it's still an improvement. Remember, this is all about a heuristic anyway: the user uploads an attachment, claiming it is a patch, and the question is, should Launchpad believe the user vs should Launchpad ask the user to confirm that it's really a patch?

The logic that determines whether we interpose this confirmation step has never been perfect, but this change makes it better. If a file ends in ".debdiff", ".diff", or ".patch", it's pretty likely to be a patch -- the chances that someone clicked on the wrong file in the upload file browser are much higher than the chances that they mis-named the file in the first place (or got a mis-named file from elsewhere). So we're adjusting our confirmation bias accordingly.

Launchpad can still guess wrong, of course. But the only consequence is that an attachment may be marked as a patch when it's not really a patch.

Obviously, the ideal solution would look at the contents of the file and see if it "looks like a patch". That's harder to code, though, and didn't seem like a good use of time, considering that it's not important to get perfect answers every time here.