Index: gallery_base.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/gallery/gallery_base.inc,v
retrieving revision 1.6.2.14
diff -u -r1.6.2.14 gallery_base.inc
--- gallery_base.inc	30 May 2007 14:49:27 -0000	1.6.2.14
+++ gallery_base.inc	30 May 2007 21:03:11 -0000
@@ -280,8 +280,9 @@
   if (count($css)) {
     $css = preg_replace('/<link(.*?)href="([^"]*)"([^\/]*)\/>/i', '${2}', $css);
     foreach ($css as $include) {
+      $include = strstr($include, base_path()) ? substr($include, strlen(base_path())) : $include;
       // Gallery's CSS will always be added first, what allows overriding in the module(s)
-      drupal_add_css(substr($include, strlen(base_path())), 'module', 'all', FALSE);
+      drupal_add_css($include, 'module', 'all', FALSE);
     }
   }
 }
@@ -298,7 +299,8 @@
     drupal_add_js(implode("\n", $inline), 'inline');
     $files = preg_replace('/<script(.*?)src="([^"]*)"([^>]*)>(.*?)<\/script>/i', '${2}', $files);
     foreach ($files as $include) {
-      drupal_add_js(substr($include, strlen(base_path())));
+      $include = strstr($include, base_path()) ? substr($include, strlen(base_path())) : $include;
+      drupal_add_js($include);
     }
   }
 }
