From 34232dce2b914f25fecb319738a7ecca8bdcbc86 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sun, 17 Jun 2007 00:46:57 +0000 Subject: [PATCH] Use Session::session_directory to access the export path for a session instead of Session::export_dir git-svn-id: svn://localhost/ardour2/trunk@2006 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/export_dialog.cc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc index 0707dd8230..3a66099b6c 100644 --- a/gtk2_ardour/export_dialog.cc +++ b/gtk2_ardour/export_dialog.cc @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -957,18 +958,14 @@ ExportDialog::start_export () */ if (file_entry.get_text().length() == 0) { - string dir = session->export_dir(); - string::size_type last_slash; - - if ((last_slash = dir.find_last_of ('/')) != string::npos && last_slash != 0) { - dir = dir.substr (0, last_slash+1); - } + + sys::path export_file_path = session->session_directory().export_path(); if (!wants_dir()) { - dir = dir + "export.wav"; + export_file_path /= "export.wav"; } - file_entry.set_text (dir); + file_entry.set_text (export_file_path.to_string()); } progress_bar.set_fraction (0);