Currently install_upload_file() will not work in subdirectories of the files directory if the destination does not yet exist. This is because we're using file_check_path() instead of file_check_directory(). file_check_path() works on both files and directories, but won't create a directory if not already existing. This patch switches it to file_check_directory(), since we only need to check directories, and it would be more inline with Drupal's normal behavior to create a directory if it doesn't yet exist on upload.

CommentFileSizeAuthor
install_profile_api_upload_fix.patch473 bytesquicksketch

Comments

quicksketch’s picture

Status: Needs review » Fixed

I've committed this change.

quicksketch’s picture

This change has been committed to the 5--2 backport.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.