changeset 9764:7922a24f78c0

fix relative directory caching
author John W. Eaton <jwe@octave.org>
date Sun, 01 Nov 2009 12:36:06 -0500
parents 63d554a54da6
children 7fc1c8c47b86
files src/ChangeLog src/load-path.cc
diffstat 2 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-01  John W. Eaton  <jwe@octave.org>
+
+	* load-path.cc (load_path::dir_info::update): Always initialize
+	relative directories that are not yet included in abs_dir_cache.
+
 2009-10-29  John W. Eaton  <jwe@octave.org>
 
 	* parse.y (finish_function): Return function object unless parsing
--- a/src/load-path.cc
+++ b/src/load-path.cc
@@ -80,8 +80,12 @@
 		    initialize ();
 		  else
 		    *this = di;
+		}
+	      else
+		{
+		  // We haven't seen this directory before.
 
-		  return;
+		  initialize ();
 		}
 	    }
 	  catch (octave_execution_exception)
@@ -92,8 +96,7 @@
 	      error_state = 0;
 	    }
 	}
-
-      if (fs.mtime () + fs.time_resolution () > dir_time_last_checked)
+      else if (fs.mtime () + fs.time_resolution () > dir_time_last_checked)
 	initialize ();
     }
   else