So if I understand well, if the path contains "data/vincent/files/myfile.txt" then this strpos will return 4 and encryption will be disabled ? (since it's different than 0) ? Shouldn't it be the reverse condition or am I missing something ?

Is the encryption proxy activated for other apps than the "files" one ? For example if my own app tries to create a file in "data/someuser/myappdir", would the file be encrypted ? If yes, then if a file is called "data/someuser/myappdir/__someuser/myappdir__/myfile.txt" it also would not be encrypted ?