# HG changeset patch # User John W. Eaton # Date 1366143138 14400 # Node ID 01541f7321f78fe67870c28972c72607324d70ce # Parent e192525236ad2d32978fe1ed9cf5b44a712ee682 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. diff --git a/libgui/src/main-window.cc b/libgui/src/main-window.cc --- 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 diff --git a/libinterp/interpfcn/dirfns.cc b/libinterp/interpfcn/dirfns.cc --- 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));