View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003070 | ardour | bugs | public | 2010-04-14 12:11 | 2020-04-19 20:14 |
| Reporter | johne53 | Assigned To | paul | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 2.6.1 | ||||
| Summary | 0003070: Possible strategy bug in ExportRangeMarkersDialog::get_target_filepath(...) | ||||
| Description | I found this code at approximately line 121 in gtk2_ardour/export_range_markers_dialog.cc:- if ((target_path.find_last_of ('/')) != string::npos) { target_path += '/'; I think it's intended to append a forward slash if the supplied path doesn't already end with one. If that's the intent, this code is more suitable:- if ((target_path.find_last_of ('/')) != (target_path.length()-1)) { target_path += '/'; | ||||
| Tags | No tags attached. | ||||
|
|
the code isn't at all suitable, because it hardcodes the use of '/' ... a thorough audit of the entire ardour codebase for this mistake is required. |
|
|
I only meant that it's *more* suitable than what was there previously (since it at least does what was intended!) If it's any help though Paul, my modifications for the Windows port have tended to use this kind of approach.... std::transform (target_path.begin(), target_path.end(), target_path.begin(), reconcile_folder_separators); if ((target_path.find_last_of (G_DIR_SEPARATOR)) != (target_path.length()-1)) { target_path += G_DIR_SEPARATOR; ....where 'reconcile_folder_separators()' converts all folder separators to backslashes (under Windows) or to forward slashes otherwise. Let me know if you'd prefer a different approach. |
|
|
john, sorry, i didn't mean that your suggestion was "unsuitable". just that we shouldn't have been using '/' at all. anyway, i just committed some changes for libardour and gtk2_ardour that remove all use of explicit '/', and adds the use of Glib::build_filename() in quite a few cases. i haven't yet looked for /'s within strings, or in other libraries. |
|
|
see notes (relevant svn rev is 6909) |
|
|
Issue has been closed automatically, by Trigger Close Plugin. Feel free to re-open with additional information if you think the issue is not resolved. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2010-04-14 12:11 | johne53 | New Issue | |
| 2010-04-14 14:17 | paul | Note Added: 0007485 | |
| 2010-04-14 15:30 | johne53 | Note Added: 0007486 | |
| 2010-04-15 14:45 | paul | Note Added: 0007489 | |
| 2010-04-15 14:46 | paul | cost | => 0.00 |
| 2010-04-15 14:46 | paul | Note Added: 0007490 | |
| 2010-04-15 14:46 | paul | Status | new => resolved |
| 2010-04-15 14:46 | paul | Resolution | open => fixed |
| 2010-04-15 14:46 | paul | Assigned To | => paul |
| 2010-04-24 10:28 | cth103 | Category | bugs => bugs2 |
| 2010-04-24 10:29 | cth103 | Category | bugs2 => bugs |
| 2020-04-19 20:14 | system | Note Added: 0022042 | |
| 2020-04-19 20:14 | system | Status | resolved => closed |