Index: modules/cvslog/cvs.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cvslog/cvs.module,v
retrieving revision 1.114
diff -u -F^f -r1.114 cvs.module
--- modules/cvslog/cvs.module	19 Jun 2006 10:46:54 -0000	1.114
+++ modules/cvslog/cvs.module	19 Jun 2006 21:21:51 -0000
@@ -292,6 +292,12 @@ function cvs_settings() {
     '#default_value' => variable_get('cvs_validate_by_short_name', 1),
       '#description' => t("If this box is checked, the last element of the path specified in the %cvs_dir field must match the %short_name field for project nodes.", array('%cvs_dir' => theme('placeholder', 'CVS directory'), '%short_name' => theme('placeholder', 'Project short name'))),
   );
+  $form['cvs_directory_validate_dir_root_by_case'] = array(
+    '#title' => t('Ensure lowercase for first element of %cvs_dir', array('%cvs_dir' => theme('placeholder', 'CVS directory'))),
+    '#type' => 'checkbox',
+    '#default_value' => variable_get('cvs_validate_dir_root_by_case', 1),
+    '#description' => t("If this box is checked, the first element of the path specified in the %cvs_dir field must be lowercase.", array('%cvs_dir' => theme('placeholder', 'CVS directory'))),
+  );
   $form['cvs_message_anon'] = array(
     '#title' => t('Message to anonymous users'),
     '#type' => 'textarea',
@@ -344,9 +350,14 @@ function cvs_nodeapi(&$node, $op, $arg =
             $path_elems = explode('/', $node->cvs_directory);
             // Remove empty elements caused by the trailing and leading '/'.
             $path_elems = array_filter($path_elems);
+            if (variable_get('cvs_directory_validate_dir_root_by_case', 1)) {
+              if ($path_elems[1] != drupal_strtolower($path_elems[1])) {
+                form_set_error('cvs_directory', t("The root of the CVS directory (%root) must be lowercase.", array('%root' => theme('placeholder', $path_elems[1]))));
+              }
+            }
             if (project_use_taxonomy() && variable_get('cvs_directory_validate_by_type', 1)) {
               $tree = taxonomy_get_term($node->project_type);
-              if ($path_elems[1] != $tree->name) {
+              if (drupal_strtolower($path_elems[1]) != drupal_strtolower($tree->name)) {
                 form_set_error('cvs_directory', t("The root of the CVS directory (%root) does not match the selected project type (%type).", array('%root' => theme('placeholder', $path_elems[1]), '%type' => theme('placeholder', $tree->name))));
               }
             }
