← Back to team overview

mahara-contributors team mailing list archive

[Bug 1170587] Re: Problem with multi-level mkdir() in artefact/file/db/upgrade.php

 

On further inspection, it turns out that a better approach using
check_dir_exists() was implemented on the 1.5_STABLE and 1.6_STABLE
branches, but for some reason was not ported to the master branch.

See Bug #1080498, and https://reviews.mahara.org/#/c/1862

We should probably take that version (which includes an exception-
catching clause) and port it to master and 1.7_STABLE

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contrib members
https://bugs.launchpad.net/bugs/1170587

Title:
  Problem with multi-level mkdir() in artefact/file/db/upgrade.php

Status in Mahara ePortfolio:
  Fix Committed
Status in Mahara 1.7 series:
  Fix Committed

Bug description:
  While upgrading demo.mahara.org from 1.6.4 to 1.7.0, I found the
  upgrade script errored out repeatedly, because in
  artefact/file/db/upgrade.php, in the section for version 2012092400,
  it tried to create a new directory "artefact/file/originals" under the
  dataroot. But, the base "artefact" directory itself didn't exist in my
  dataroot, and mkdir() defaults to NOT creating intermediate
  directories.

  So, I changed mkdir to create the intermediate directories, and then
  the installation went through okay.

  I'm not sure whether this is a problem other people might encounter,
  or whether it's due to the peculiarities of demo.mahara.org (which is
  reset by a script on a daily basis). But it wouldn't hurt to add it.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1170587/+subscriptions


References