]> granicus.if.org Git - ejabberd/commitdiff
*** empty log message ***
authorAlexey Shchepin <alexey@process-one.net>
Mon, 6 Jan 2003 20:05:48 +0000 (20:05 +0000)
committerAlexey Shchepin <alexey@process-one.net>
Mon, 6 Jan 2003 20:05:48 +0000 (20:05 +0000)
SVN Revision: 31

src/translate.erl

index 0c6d49ef15cfaaa7a7c7d04c2c59cb520e8204ad..ca2a8f03cbde15af6357af12d18dd17a4c38714f 100644 (file)
@@ -25,7 +25,13 @@ load_dir(Dir) ->
     {ok, Files} = file:list_dir(Dir),
     MsgFiles = lists:filter(
                 fun(FN) ->
-                        string:substr(FN, string:len(FN) - 3) == ".msg"
+                        case string:len(FN) > 4 of
+                            true ->
+                                string:substr(FN,
+                                              string:len(FN) - 3) == ".msg";
+                            _ ->
+                                false
+                        end
                 end, Files),
     lists:foreach(
       fun(FN) ->