changeset 12418:c5f9ce349068 octave-forge

Fix case sensitity for search for Libre/OpenOffice on *nix systems
author prnienhuis
date Sun, 06 Apr 2014 19:05:24 +0000
parents 0f3335bcacd6
children 60ee77bf0d93
files main/io/PKG_ADD
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/main/io/PKG_ADD	Sun Apr 06 19:04:41 2014 +0000
+++ b/main/io/PKG_ADD	Sun Apr 06 19:05:24 2014 +0000
@@ -30,10 +30,10 @@
                "/opt", ...
                "/usr/lib"};
   while (isempty (ooopath) && ii < numel (bnam))
-    ooopath = glob ([ bnam{++ii} filesep "LibreOffice*"]);
+    ooopath = glob ([ bnam{++ii} filesep "[Ll]ibre[Oo]ffice*"]);
   endwhile
   while (isempty (ooopath) && ii < numel (bnam))
-    ooopath = glob ([ bnam{++ii} filesep "OpenOffice.org*"]);
+    ooopath = glob ([ bnam{++ii} filesep "[Oo]pen[Oo]ffice.org*"]);
   endwhile
   while (isempty (ooopath) && ii < numel (bnam))
     ooopath = glob ([ bnam{++ii} filesep "ooo*"]);
@@ -48,7 +48,7 @@
   try
     if (! isempty (userdir))
       if (strcmpi (userdir, "no") || strcmpi (userdir, "false") || strcmpi (userdir, "0"))
-        ## Do not load Java class libs .jar files). First clean up
+        ## Do not load Java class libs .jar files). First clean up, then return
         clear libdir spr_status userdir homedir ;
         return
       endif
@@ -66,8 +66,8 @@
     endif
     ## Try <HOME>/java
     spr_status = chk_spreadsheet_support ([ homedir filesep "java" ], 0, ooopath);
-    ## Only then search for system-supplied jars
-    spr_status = chk_spreadsheet_support ([ libdir filesep "java" ], 0, ooopath);
+    ## Only then search for system-supplied jars. ooopath has been searched
+    spr_status = chk_spreadsheet_support ([ libdir filesep "java" ], 0);
   catch
     warning ("(Automatic loading of spreadsheet I/O Java classlibs failed)\n");
   end_try_catch