--- texy.module	Fri Feb 23 18:24:45 2007
+++ texy.module	Mon Mar 19 20:48:36 2007
@@ -106,8 +106,9 @@
     '#type' => 'textfield',
     '#size' => '12',
     '#title' => t('Directory'),
-    '#description' => t('Directory where to look for saved images. This is usually something like <tt>/'.file_directory_path().'/images</tt>'),
-    '#default_value' => variable_get('texy_image_dir', '/'.file_directory_path().'/images'),
+    '#description' => t('Subdirectory in the directory <code>%dir</code> where pictures are stored. Do not include trailing slash.', array('%dir' => variable_get('file_directory_path', 'files'))),
+    '#default_value' => 'images',
+    '#field_prefix' => variable_get('file_directory_path', 'files') . '/',
   );
   $form['imageset']['texy_image_class_left'] = array(
     '#type' => 'textfield',
@@ -320,8 +321,8 @@
     $texy->allowedStyles = preg_split('/,/', str_replace(' ', '', $_allowedstyles));
   }
 
-  $texy->imageModule->root = variable_get('texy_image_dir', 'files/images');
-  $texy->imageModule->rootPrefix;
+  $texy->imageModule->root = base_path() . file_create_path(variable_get('texy_image_dir', 'images'));
+  $texy->imageModule->rootPrefix = $_SERVER['DOCUMENT_ROOT'] . '/';
 
   $_imageclassleft = variable_get('texy_image_class_left', '');
   if (empty($_imageclassleft)) {
