diff options
author | Siri Hansen <[email protected]> | 2017-07-06 17:25:37 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2017-09-15 17:07:51 +0200 |
commit | fb9235e7c3a6872a1394e5ba0c78217d9617f8e3 (patch) | |
tree | 758aa4ef26fac6475883450b4ccc599d23bcc08e /lib/observer/src/cdv_wx.erl | |
parent | 09e2288b7a42345ea76e5e23ad93346c63efb06d (diff) | |
download | otp-fb9235e7c3a6872a1394e5ba0c78217d9617f8e3.tar.gz otp-fb9235e7c3a6872a1394e5ba0c78217d9617f8e3.tar.bz2 otp-fb9235e7c3a6872a1394e5ba0c78217d9617f8e3.zip |
observer: Do not use deprecated functions in string(3)
Diffstat (limited to 'lib/observer/src/cdv_wx.erl')
-rw-r--r-- | lib/observer/src/cdv_wx.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/observer/src/cdv_wx.erl b/lib/observer/src/cdv_wx.erl index 1e3fb6289e..7f8feebdbd 100644 --- a/lib/observer/src/cdv_wx.erl +++ b/lib/observer/src/cdv_wx.erl @@ -130,8 +130,9 @@ init(File0) -> {ok,File} -> %% Set window title T1 = "Crashdump Viewer: ", + FileLength = string:length(File), Title = - if length(File) > 70 -> + if FileLength > 70 -> T1 ++ filename:basename(File); true -> T1 ++ File @@ -419,8 +420,9 @@ load_dump(Frame,FileName) -> ok -> %% Set window title T1 = "Crashdump Viewer: ", + FileLength = string:length(FileName), Title = - if length(FileName) > 70 -> + if FileLength > 70 -> T1 ++ filename:basename(FileName); true -> T1 ++ FileName |