View Issue Details

IDProjectCategoryView StatusLast Update
0006069ardourbugspublic2015-01-06 13:33
Reporterpablomme Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Summary0006069: Session created under $HOME/$HOME instead of nautilus bookmark
DescriptionSteps to reproduce (using git commit 9548b916e7d2f33e3ef4240d0f4cc474cb70aaa8 under 64-bit Ubuntu 14.04):
- Create directory $HOME/Potatoes and bookmark it in nautilus
- Open Ardour
- Click "New Session"
- Type "test" for "Session name"
- For "Create session folder in" select "Potatoes" from the drop-down list
- Click "Open"

This results in session "test" being created under $HOME/$HOME/test instead of $HOME/Potatoes/test. As far as I can tell this doesn't happen if the target directory is not a nautilus bookmark.
TagsNo tags attached.

Activities

2014-12-11 07:19

 

fix_bookmark_selection.patch (918 bytes)   
From 9ad00469f41a3939d2dc55c298378f3bed4976e7 Mon Sep 17 00:00:00 2001
From: Julien ROGER <gulien.roger@gmail.com>
Date: Thu, 11 Dec 2014 08:07:37 +0100
Subject: [PATCH] Fixes bookmark selection in new session dialog => fixes #6069

---
 gtk2_ardour/session_dialog.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtk2_ardour/session_dialog.cc b/gtk2_ardour/session_dialog.cc
index 72dd0c8..bfb9aa7 100644
--- a/gtk2_ardour/session_dialog.cc
+++ b/gtk2_ardour/session_dialog.cc
@@ -255,7 +255,7 @@ SessionDialog::session_folder ()
 		std::string val = new_name_entry.get_text();
 		strip_whitespace_edges (val);
 		std::string legal_session_folder_name = legalize_for_path (val);
-		return Glib::build_filename (new_folder_chooser.get_current_folder(), legal_session_folder_name);
+		return Glib::build_filename (new_folder_chooser.get_filename(), legal_session_folder_name);
 	}
 }
 
-- 
2.1.3

elgoun

2014-12-11 07:20

reporter   ~0016027

I think there is 2 problems here:

In my ~/.config/ardour3/config file "old(created on 2014/08/10)", the "default-session-parent-dir" parameter is set to "/home/julien/MAO/~" (Maybe a previous bug ?)

By default, The "current_folder" of the GtkFileChooserButton is set in SessionDialog::setup_new_session_page() via

new_folder_chooser.set_current_folder (poor_mans_glob (Config->get_default_session_parent_dir()));

=> the resulting path as noted is "default_session_parent_dir/$HOME"

Removing the "old" ardour3 config dir or the trailing ~ in config file fixes the problem.

Now,for bookmarks:

This is a GtkFileChooserButton behaviour (bug?).

When a bookmark is selected in the dropdown menu, the internal "current_folder" of the GtkFileChooserButton isn't updated.

==>new_folder_chooser.get_current_folder() returns the default session parent dir.

I think we can use get_filename() instead in order to fix it since in FILE_CHOOSER_ACTION_SELECT_FOLDER mode, get_filename() returns the selected folder.

I have uploaded a little patch.

Sorry for my english ;-)

pablomme

2014-12-11 09:32

reporter   ~0016029

Thanks, that explains why this was happening. I've checked my config file and I had the same issue with default-session-parent-dir, which for some reason was set to /home/pablo/~, even though it used to be set to ~/Record/ArdourSessions.

There is a third issue involved in this: the tilde character '~' should not be expanded to $HOME unless it is the first character in a path name and is either followed by a slash or is the only character in the string. E.g., ~ and ~/Record expand to $HOME and $HOME/Record, but ~x/Record and /usr/~ expand to ~x/Record and /usr/~. There are other uses for tilde expansion (e.g., ~user/ and bash's ~0 etc), but getting just this case right would be enough for Ardour's purposes.

bruno

2014-12-19 23:21

reporter   ~0016069

Last edited: 2014-12-19 23:24

I can confirm I have experienced this problem. For example:
- Open Ardour
- Click "New Session"
- Type "create-in-desktop" for "Session name"
- Select "Desktop" from the menu (as in screenshot uploaded here)
- Create the session

Doing this saves the session folder in:

/home/ruviaro/home/ruviaro/create-in-desktop

If I use the "Other" option to select a destination, then the session gets saved in the actual location I choose.

2014-12-19 23:23

 

timbyr

2015-01-06 05:15

developer   ~0016207

I can confirm the incorrect behaviour when using file chooser button for session folder selection in build 3.5-4193-g946e63a

I believe your fix is correct and will push to master after a bit more testing.

I haven't looked into the tilde expansion issue yet. Is there a simple way to reproduce the problem? or is it a mix of issues resulting from previous/existing bugs?

timbyr

2015-01-06 13:33

developer   ~0016210

The issue setting the session folder with the file chooser button should now be fixed in master branch as of commit 59a15a1

Issue History

Date Modified Username Field Change
2014-12-10 16:35 pablomme New Issue
2014-12-11 07:19 elgoun File Added: fix_bookmark_selection.patch
2014-12-11 07:20 elgoun Note Added: 0016027
2014-12-11 09:32 pablomme Note Added: 0016029
2014-12-19 23:21 bruno Note Added: 0016069
2014-12-19 23:23 bruno File Added: Screenshot from 2014-12-19 15:15:30.png
2014-12-19 23:24 bruno Note Edited: 0016069
2015-01-06 05:15 timbyr Note Added: 0016207
2015-01-06 05:15 timbyr Status new => confirmed
2015-01-06 13:33 timbyr Note Added: 0016210