Index: demo.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/demo/demo.admin.inc,v
retrieving revision 1.31
diff -u -p -r1.31 demo.admin.inc
--- demo.admin.inc	30 Aug 2010 16:28:02 -0000	1.31
+++ demo.admin.inc	4 Sep 2010 01:09:28 -0000
@@ -30,7 +30,15 @@ function demo_admin_settings($form, &$fo
     '#markup' => t('<p><strong>Last reset:</strong> !date</p>', array('!date' => $reset_date)),
   );
 
-  $fileconfig = demo_get_fileconfig();
+  if (!file_stream_wrapper_valid_scheme('private')) {
+    // @todo Temporarily throwing a form error here.
+    form_set_error('', t('The <a href="@file-settings-url">private filesystem</a> must be configured in order to create or load snapshots.', array(
+      '@file-settings-url' => url('admin/config/media/file-system', array(
+        'query' => drupal_get_destination(),
+      )),
+    )));
+  }
+//  $fileconfig = demo_get_fileconfig();
 
   $form['dump'] = array(
     '#type' => 'fieldset',
@@ -41,8 +49,12 @@ function demo_admin_settings($form, &$fo
   $form['dump']['demo_dump_path'] = array(
     '#type' => 'textfield',
     '#title' => t('Dump path'),
-    '#default_value' => $fileconfig['path'],
-    '#description' => t('Enter a writable directory where dump files of this demonstration site are stored, f.e. %files. The name of this site (e.g. %confpath) is automatically appended to this directory, if required.<br /><br /><strong>Note: For security reasons you should store site dumps outside of the document root of your webspace!</strong>', array('%files' => file_directory_path('private') . '/demo', '%confpath' => $fileconfig['site'])),
+    '#default_value' => variable_get('demo_dump_path', 'demo'),
+    '#required' => TRUE,
+//    '#description' => t('Enter a writable directory where dump files of this demonstration site are stored, f.e. %files. The name of this site (e.g. %confpath) is automatically appended to this directory, if required.', array(
+//      '%files' => 'demo',
+//      '%confpath' => $fileconfig['site'],
+//    )),
   );
   $form['#validate'][] = 'demo_admin_settings_validate';
 
@@ -323,14 +335,24 @@ function demo_get_fileconfig($filename =
   $fileconfig = array();
 
   // Build dump path.
-  $fileconfig['path'] = variable_get('demo_dump_path', file_directory_path('private') . '/demo');
+  if (!file_stream_wrapper_valid_scheme('private')) {
+    // @todo Temporarily throwing a form error here.
+    form_set_error('', t('The <a href="@file-settings-url">private filesystem</a> must be configured in order to create or load snapshots.', array(
+      '@file-settings-url' => url('admin/config/media/file-system', array(
+        'query' => drupal_get_destination(),
+      )),
+    )));
+    return FALSE;
+  }
+  $fileconfig['path'] = 'private://' . variable_get('demo_dump_path', 'demo');
   $fileconfig['dumppath'] = $fileconfig['path'];
-  // Append site name if it is not included in file_directory_path() and if not
-  // storing files in sites/all/files.
+  // @todo Update to D7?
+//  // Append site name if it is not included in file_directory_path() and if not
+//  // storing files in sites/all/files.
   $fileconfig['site'] = str_replace('sites', '', conf_path());
-  if (strpos($fileconfig['path'], conf_path()) === FALSE && strpos($fileconfig['path'], '/all/') === FALSE) {
-    $fileconfig['dumppath'] .= $fileconfig['site'];
-  }
+//  if (strpos($fileconfig['path'], conf_path()) === FALSE && strpos($fileconfig['path'], '/all/') === FALSE) {
+//    $fileconfig['dumppath'] .= $fileconfig['site'];
+//  }
 
   // Check if directory exists.
   if (!file_prepare_directory($fileconfig['dumppath'], FILE_CREATE_DIRECTORY)) {
Index: demo.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/demo/demo.install,v
retrieving revision 1.8
diff -u -p -r1.8 demo.install
--- demo.install	10 Nov 2009 05:37:52 -0000	1.8
+++ demo.install	4 Sep 2010 01:10:40 -0000
@@ -36,3 +36,7 @@ function demo_update_6100() {
   }
 }
 
+/**
+ * @todo Remove file_directory_path() from demo_dump_path variable.
+ */
+
