It would be different if some guy broke into the guys home and stole his computer, and the cops actually recovered the computer and then discovered the porn and charged him.
In this case the guy waived any privacy right by taking his computer to a public place.
It's the same thing with patient/doctor confidentiality. If there's someone else besides the patient in the room (such as a friend) and you still volunteer information, that info is no longer confidential.