We use the Media module in our installation and on some occasions following error is thrown during installation of the profile (and the module obviously):

WD media: Exception: Unable to create directory public://media-icons/default. in _media_install_copy_icons() (line 34 of         [error]

This happens even if the files folder is removed and prepared with correct permissions beforehand.

#7 unable_to_create-2568123-7.patch686 bytesbetz
#2 unable_to_create-2568123-2.patch1.01 KBdavid.lukac
PASSED: [[SimpleTest]]: [MySQL] 922 pass(es). View


david.lukac created an issue. See original summary.

david.lukac’s picture

1.01 KB
PASSED: [[SimpleTest]]: [MySQL] 922 pass(es). View

Adding flag FILE_MODIFY_PERMISSIONS to file_prepare_directory() fixes the issue for me - supplying a patch.

david.lukac’s picture

Status: Active » Needs review

Anyone to review the patch? :-)

sylus’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me and is always used through Drupal Core, minor nit being the order written.


file_prepare_directory($dir_uri, FILE_CREATE_DIRECTORY || FILE_MODIFY_PERMISSIONS);

But looks good to me! Thx so much!

sylus’s picture

Status: Reviewed & tested by the community » Fixed
sylus’s picture

Status: Fixed » Reviewed & tested by the community

Whoops wrong issue, apologies!

betz’s picture

patch recreated with correct operator.

betz’s picture

Status: Reviewed & tested by the community » Needs review

  • joseph.olstad committed 4e38e46 on 7.x-2.x authored by betz
    Issue #2568123 by david.lukac, betz: "Unable to create directory" when...
joseph.olstad’s picture

Version: 7.x-2.0-alpha4 » 7.x-2.x-dev
Status: Needs review » Fixed

fixed in 7.x-2.x dev branch

Status: Fixed » Closed (fixed)

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