On first installation (with the no_dba.patch, which I assume is pretty independant of this issue) I visited
/admin/settings/demo
and got

The directory sites/api.monster/files/demo/api.monster does not exist.

That is to say {files_dir}/demo/{site_instance}

I appreciate the advice to shift the backups into a safe place, but the first impression of an error is annoying.
demo_get_fileconfig()

  // Check if directory exists.
  file_check_directory($fileconfig['path'], FILE_CREATE_DIRECTORY, 'path');
  if (!file_check_directory($fileconfig['dumppath'], FILE_CREATE_DIRECTORY, 'path')) {
    return false;
  }

... creates the dir on the fly. You woldn't have noticed it lacking during development, I'm guessing :)

While I'm there, taking a leaf from file.inc on security, I'll deny access to these files

  // Protect this directory.
  $htaccess = $fileconfig['path'] ."/.htaccess";
  if (!is_file($fileconfig['path'] )) {
    $htaccess_lines = "#demo.module snapshots\n#Do not let the webserver serve anything under here!\n#\nDeny from all\n";
    if (($fp = fopen($htaccess, 'w')) && fputs($fp, $htaccess_lines)) {
      fclose($fp);
      chmod($htaccess, 0664);
    }
  }

... other than that, the install was pretty intuative.

I won't attach a patch until the no_db patch is committed.

CommentFileSizeAuthor
#1 demo-DRUPAL-5_0.patch1.28 KBsun

Comments

sun’s picture

Title: Minor UI issues - first run config should create dump directory » Demo directory is not created on first run config
Version: 5.x-1.x-dev » 5.x-1.0
Component: User interface » Code
StatusFileSize
new1.28 KB

Thanks! I think, that is what you meant?

Needs testing.

dman’s picture

Looks like what I meant, yeah.
I'll try to test it .. if I ever finish rebuilding my dev machine (ug, 6 hours and counting)

sun’s picture

Status: Needs review » Fixed

Tested and committed. Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)