diff liboctave/file-ops.cc @ 5149:8b7b4ffab39c

[project @ 2005-02-18 21:59:24 by jwe]
author jwe
date Fri, 18 Feb 2005 21:59:24 +0000
parents 5fa9670b5956
children 4c8a2e4e0717
line wrap: on
line diff
--- a/liboctave/file-ops.cc	Fri Feb 18 19:04:34 2005 +0000
+++ b/liboctave/file-ops.cc	Fri Feb 18 21:59:24 2005 +0000
@@ -355,9 +355,10 @@
   // relative names into absolute ones, so prepend the working
   // directory if the path is not absolute.
 
-  name = octave_env::make_absolute (name);
+  std::string absolute_name
+    = octave_env::make_absolute (name, octave_env::getcwd ());
 
-  size_t resolved_size = name.length ();
+  size_t resolved_size = absolute_name.length ();
 
   while (1)
     {
@@ -365,7 +366,8 @@
 
       OCTAVE_LOCAL_BUFFER (char, resolved, resolved_size);
 
-      resolved_len = ::resolvepath (name, resolved, resolved_size);
+      int resolved_len
+	= ::resolvepath (absolute_name.c_str (), resolved, resolved_size);
 
       if (resolved_len < 0)
 	break;