# HG changeset patch # User Rik # Date 1355640446 28800 # Node ID ac9e34f835224e48d51cacda54c49452cf24241c # Parent 492893b98eef89cdbc87464057240993f8e7f3eb Allow one char paths, like '/', in javaclasspath.txt * libinterp/octave-value/ov-java.cc(read_classpath.txt): Process line if length is > 0, not 1. Eliminate CamelCase variable iLast. Trim all whitespace from path before adding to static classpath. diff -r 492893b98eef -r ac9e34f83522 libinterp/octave-value/ov-java.cc --- a/libinterp/octave-value/ov-java.cc Sat Dec 15 17:53:31 2012 -0800 +++ b/libinterp/octave-value/ov-java.cc Sat Dec 15 22:47:26 2012 -0800 @@ -293,19 +293,19 @@ { std::getline (fs, line); - if (line.length () > 1) + if (line.length () > 0) { - if (line.at(0) == '#' || line.at(0) == '%') + if (line[0] == '#' || line[0] == '%') ; // skip comments else { // prepend separator character classpath.append (dir_path::path_sep_str ()); - // append content of line without trailing blanks - int iLast = line.find_last_not_of (' '); + // append content of line without whitespace + int last = line.find_last_not_of (" \t\f\v\r\n"); - classpath.append (file_ops::tilde_expand (line.substr (0, iLast+1))); + classpath.append (file_ops::tilde_expand (line.substr (0, last+1))); } } } @@ -314,7 +314,6 @@ return (classpath); } - static std::string initial_class_path (void) {