Article R249-40 of the French Code of Criminal Procedure
If the imprisoned person is both remanded in custody and serving a sentence, only the liberty and custody judge has jurisdiction to hear applications made under article 803-8. However, if the liberty and custody judge, after noting that the conditions of detention are contrary to the applicant’s dignity, decides to end the pre-trial detention pursuant to 2° of II of article 803-8, he shall immediately inform the sentence enforcement judge…