Mercurial > octave
changeset 21628:37a44d8af461
Allow dbstop @class/method with forward slash on Windows (bug #47575).
* debug.cc (get_user_code): Explicitly translate '/' to file_sep_char
for '@' classes.
author | Lachlan Andrew <lachlanbis@gmail.com> |
---|---|
date | Sun, 10 Apr 2016 10:22:18 +1000 |
parents | 225d88a97104 |
children | 9958cead45e2 |
files | libinterp/corefcn/debug.cc |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/debug.cc Sat Apr 16 19:15:37 2016 +0100 +++ b/libinterp/corefcn/debug.cc Sun Apr 10 10:22:18 2016 +1000 @@ -185,6 +185,14 @@ { std::string name = fname; + if (file_ops::dir_sep_char () != '/' && name[0] == '@') + { + int len = name.length () - 1; // -1: can't have trailing '/' + for (int i = 2; i < len; i++) // 2: can't have @/method + if (name[i] == '/') + name[i] = file_ops::dir_sep_char (); + } + size_t name_len = name.length (); if (! name.empty () && name_len > 2 && name.substr (name_len-2) == ".m")