Skip to content
Unverified Commit b7f86698 authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Prevent endless loop in \OC\Files\View::createParentDirectories



\OC\Files\View::createParentDirectories was previously prone to an endless loop. If a path such as /foo/existingfile.txt/bar/foo was passed and existingfile.txt existed in foo the loop was never left and running until the PHP process timed out.

This commit changes the logic to a foreach loop over an array and additionally additional error handling using is_file.

Signed-off-by: default avatarLukas Reschke <lukas@statuscode.ch>
parent 5cea7f35
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment