The Slovenian police had accessed data on the computer of Igor Benedikt without a court order, which is a breach of Article 8 of the European Convention on Human Rights, the court said on Tuesday.
Six of the seven judges supported the decision.
Benedikt's IP address had been originally obtained by the Swiss authorities who monitored the users of specific networks for sharing of files on-line. They identified him as one of the users who shared child pornography.
In December 2008, Benedikt was found guilty of possession and distribution of child porn content by the Kranj District Court and got a suspended sentence.
After an appeal, a higher court in Ljubljana sentenced him to six months in prison in 2009. The Supreme Court rejected his appeal on a point of law in 2011 and his appeal was also denied by the Constitutional Court in 2014.
The Constitutional Court argued that the plaintiff's rights to communication privacy had not been violated, because he had renounced his right to privacy when he revealed his IP to the file-sharing network.
But Benedikt took his case to the Strasbourg court the same year and the court nodded to his arguments today, awarding him EUR 3,522 in court expenses compensation. He will, however, not receive any damages.