File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -248,13 +248,19 @@ expand_dirs(Included) ->
248
248
249
249
-spec expand_dirs_or_filenames (string ()) -> [file :filename ()].
250
250
expand_dirs_or_filenames (FileName ) ->
251
- case {filelib :is_file (FileName ), filelib :is_dir (FileName )} of
252
- {false , _ } ->
253
- log_error (" File \" ~p \" is not a proper file.~n " , [FileName ]),
254
- [];
255
- {true , true } ->
256
- filelib :wildcard (FileName ++ " /**/*.{erl,hrl}" );
257
- _ -> [FileName ]
251
+ case {filelib :is_regular (FileName ), filelib :is_dir (FileName )} of
252
+ {true , false } ->
253
+ [FileName ];
254
+ {false , true } ->
255
+ filelib :wildcard (FileName ++ " /**/*.{erl,hrl}" );
256
+ {false , false } ->
257
+ case filelib :wildcard (FileName ) of
258
+ [] ->
259
+ log_error (" File \" ~p \" is not a proper file.~n " , [FileName ]),
260
+ [];
261
+ [_ |_ ] = FS ->
262
+ lists :append (expand_dirs (FS ))
263
+ end
258
264
end .
259
265
260
266
% %%=============================================================================
You can’t perform that action at this time.
0 commit comments