aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugger/src/dbg_ui_filedialog_win.erl
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2010-02-07 21:15:42 +0200
committerRaimo Niskanen <[email protected]>2010-06-07 13:44:27 +0200
commit9e962d71c6320e224025f86070f4f9421b51fea0 (patch)
tree29e4814fb8df96b8ed2ae5dab63ce34ec24a1158 /lib/debugger/src/dbg_ui_filedialog_win.erl
parent3647defb6f32d471355017967bdebb83b5c6224c (diff)
downloadotp-9e962d71c6320e224025f86070f4f9421b51fea0.tar.gz
otp-9e962d71c6320e224025f86070f4f9421b51fea0.tar.bz2
otp-9e962d71c6320e224025f86070f4f9421b51fea0.zip
debugger: Clean up as suggested by tidier
Diffstat (limited to 'lib/debugger/src/dbg_ui_filedialog_win.erl')
-rw-r--r--lib/debugger/src/dbg_ui_filedialog_win.erl13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/debugger/src/dbg_ui_filedialog_win.erl b/lib/debugger/src/dbg_ui_filedialog_win.erl
index f7d76076a5..79ccf20946 100644
--- a/lib/debugger/src/dbg_ui_filedialog_win.erl
+++ b/lib/debugger/src/dbg_ui_filedialog_win.erl
@@ -202,8 +202,7 @@ handle_event({gs, 'Files', doubleclick, _Data, _Arg}, WinInfo) ->
handle_event({gs, _Id, click, select, _Arg}, _WinInfo) ->
{select, gs:read('Selection', text)};
handle_event({gs, _Id, click, multiselect, _Arg}, WinInfo) ->
- Files = lists:map(fun(File) -> untag(File) end,
- gs:read('Files', items)),
+ Files = [untag(File) || File <- gs:read('Files', items)],
{multiselect, WinInfo#winInfo.cwd, Files};
handle_event({gs, _Id, click, filter, _Arg}, WinInfo) ->
{Cwd, Pattern} = update_win(gs:read('Filter', text),
@@ -286,7 +285,7 @@ max_existing([Name | Names]) ->
max_existing(Dir, [Name | Names]) ->
Dir2 = filename:join(Dir, Name),
case filelib:is_file(Dir2, erl_prim_loader) of
- true when Names==[] -> {Dir2, []};
+ true when Names =:= [] -> {Dir2, []};
true -> max_existing(Dir2, Names);
false -> {Dir, [Name | Names]}
end.
@@ -309,11 +308,8 @@ extra_filter([], _Dir, _Fun) -> [].
get_subdirs(Dir) ->
case erl_prim_loader:list_dir(Dir) of
{ok, FileNames} ->
- X = lists:filter(fun(FileName) ->
- File = filename:join(Dir, FileName),
- filelib:is_dir(File, erl_prim_loader)
- end,
- FileNames),
+ X = [FN || FN <- FileNames,
+ filelib:is_dir(filename:join(Dir, FN), erl_prim_loader)],
lists:sort(X);
_Error ->
[]
@@ -335,4 +331,3 @@ compare([], [$/|File]) ->
File;
compare(_, _) ->
error.
-