changeset 16528:01541f7321f7

correctly track directory for cd .. * main-window.cc (main_window::change_directory_up): Pass ".." to set_current_woring_directory instead of absolute directory name. * dirfns.cc (octave_change_to_directory): Pass current working directory to octave_link::change_directory.
author John W. Eaton <jwe@octave.org>
date Tue, 16 Apr 2013 16:12:18 -0400
parents e192525236ad
children 8701792e16ec
files libgui/src/main-window.cc libinterp/interpfcn/dirfns.cc
diffstat 2 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/main-window.cc
+++ b/libgui/src/main-window.cc
@@ -352,9 +352,7 @@
 void
 main_window::change_directory_up (void)
 {
-  QDir dir ("..");
-
-  set_current_working_directory (dir.absolutePath ());
+  set_current_working_directory ("..");
 }
 
 // Slot that is called if return is pressed in the line edit of the
--- a/libinterp/interpfcn/dirfns.cc
+++ b/libinterp/interpfcn/dirfns.cc
@@ -84,7 +84,7 @@
 
       load_path::update ();
 
-      octave_link::change_directory (xdir);
+      octave_link::change_directory (octave_env::get_current_directory ());
     }
   else
     error ("%s: %s", newdir.c_str (), gnulib::strerror (errno));