View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004361 | ardour | features | public | 2011-10-09 18:12 | 2015-09-18 15:19 |
Reporter | colinf | Assigned To | paul | ||
Priority | normal | Severity | tweak | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Target Version | 2.8.13 | ||||
Summary | 0004361: [PATCH] Don't default to or allow colons in snapshot name | ||||
Description | I occasionally have to back up Ardour session directories to FAT file systems. Mostly this is fine, but FAT doesn't really get along well with file names containing colons, and the default snapshot name contains not one, but two of them. | ||||
Additional Information | Attached a patch for A3 to replace the colons with full stops in the default snapshot name, and to disallow colons, exactly as forward-slash and backslash characters are already forbidden. I realise that the resulting time string no longer conforms to ISO 8601, but at least I can copy the files to a FAT-formatted drive. | ||||
Tags | No tags attached. | ||||
2011-10-09 18:12
|
no-colons-in-snapshot-names.A3.patch (772 bytes)
Index: gtk2_ardour/ardour_ui.cc =================================================================== --- gtk2_ardour/ardour_ui.cc (revision 10201) +++ gtk2_ardour/ardour_ui.cc (working copy) @@ -2129,7 +2129,7 @@ time (&n); localtime_r (&n, &local_time); - strftime (timebuf, sizeof(timebuf), "%FT%T", &local_time); + strftime (timebuf, sizeof(timebuf), "%FT%H.%M.%S", &local_time); prompter.set_initial_text (timebuf); } @@ -2154,6 +2154,12 @@ msg.run (); goto again; } + if (snapname.find (':') != string::npos) { + MessageDialog msg (_("To ensure compatibility with various systems\n" + "snapshot names may not contain a ':' character")); + msg.run (); + goto again; + } } vector<sys::path> p; |
2011-10-09 18:12
|
no-colons-in-snapshot-names.A2.patch (788 bytes)
Index: gtk2_ardour/ardour_ui.cc =================================================================== --- gtk2_ardour/ardour_ui.cc (revision 10201) +++ gtk2_ardour/ardour_ui.cc (working copy) @@ -2005,7 +2004,7 @@ time (&n); localtime_r (&n, &local_time); - strftime (timebuf, sizeof(timebuf), "%FT%T", &local_time); + strftime (timebuf, sizeof(timebuf), "%FT%H.%M.%S", &local_time); prompter.set_initial_text (timebuf); } @@ -2027,6 +2026,12 @@ msg.run (); goto again; } + if (snapname.find (':') != string::npos) { + MessageDialog msg (_("To ensure compatibility with various systems\n" + "snapshot names may not contain a ':' character")); + msg.run (); + goto again; + } save_state (snapname, switch_to_it); } break; |
|
And for the sake of completeness, here's a patch against A2 as well. |
|
Good spot and thanks for fixing this Colin (presuming your patch does actually work of course)! I bet a few people have fallen foul to this and not known why. |
|
Applied to A3 in SVN 10213. Thanks! |
|
applied to 2.0-ongoing as rev 12228. thanks! |
|
Closing old issues reported by me: these have long since been fixed. |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-10-09 18:12 | colinf | New Issue | |
2011-10-09 18:12 | colinf | File Added: no-colons-in-snapshot-names.A3.patch | |
2011-10-09 18:12 | colinf | File Added: no-colons-in-snapshot-names.A2.patch | |
2011-10-09 18:13 | colinf | Note Added: 0011674 | |
2011-10-10 23:17 | cth103 | cost | => 0.00 |
2011-10-10 23:17 | cth103 | Target Version | => 3.0-beta1 |
2011-10-10 23:17 | cth103 | Summary | Don't default to or allow colons in snapshot name => [PATCH] Don't default to or allow colons in snapshot name |
2011-10-10 23:37 | danboid | Note Added: 0011676 | |
2011-10-17 20:36 | cth103 | Note Added: 0011697 | |
2011-10-17 20:36 | cth103 | Target Version | 3.0-beta1 => 2.8.13 |
2012-05-15 12:19 | paul | Note Added: 0013243 | |
2012-05-15 12:19 | paul | Status | new => resolved |
2012-05-15 12:19 | paul | Resolution | open => fixed |
2012-05-15 12:19 | paul | Assigned To | => paul |
2015-09-18 15:19 | colinf | Note Added: 0017301 | |
2015-09-18 15:19 | colinf | Status | resolved => closed |