changeset 6776:d388a35a9481

[project @ 2007-07-17 15:22:47 by dbateman]
author dbateman
date Tue, 17 Jul 2007 15:22:47 +0000
parents 67794bf1ab3b
children 4775fc1aa728
files scripts/ChangeLog scripts/pkg/pkg.m
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Sat Jul 14 20:28:06 2007 +0000
+++ b/scripts/ChangeLog	Tue Jul 17 15:22:47 2007 +0000
@@ -1,3 +1,8 @@
+2007-07-17  Michael Goffioul  <michael.goffioul@gmail.com>
+
+	* pkg/pkg.m (pkg:installed_packages): Use findstr rather than regexp
+	to avoid issues with regexp special characters in the path strings.
+
 2007-07-06  David Bateman  <dbateman@free.fr>
 
         * general/accumarray.m: New function to create an array by 
--- a/scripts/pkg/pkg.m	Sat Jul 14 20:28:06 2007 +0000
+++ b/scripts/pkg/pkg.m	Tue Jul 17 15:22:47 2007 +0000
@@ -1587,21 +1587,21 @@
   ## Now check if the package is loaded
   tmppath = strrep (path(), "\\", "/");
   for i = 1:length (installed_packages)
-    if (regexp (tmppath, strrep (installed_packages{i}.dir, "\\", "/")))
+    if (findstr (tmppath, strrep (installed_packages{i}.dir, "\\", "/")))
       installed_packages{i}.loaded = true;
     else
       installed_packages{i}.loaded = false;
     endif
   endfor
   for i = 1:length (local_packages)
-    if (regexp (tmppath, strrep (local_packages{i}.dir, "\\", "/")))
+    if (findstr (tmppath, strrep (local_packages{i}.dir, "\\", "/")))
       local_packages{i}.loaded = true;
     else
       local_packages{i}.loaded = false;
     endif
   endfor
   for i = 1:length (global_packages)
-    if (regexp (tmppath, strrep (global_packages{i}.dir, "\\", "/")))
+    if (findstr (tmppath, strrep (global_packages{i}.dir, "\\", "/")))
       global_packages{i}.loaded = true;
     else
       global_packages{i}.loaded = false;