From: Andreas H. <ah...@us...> - 2004-12-31 10:53:35
|
Update of /cvsroot/jvcl/dev/JVCL3/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29855/common Modified Files: JvGnugettext.pas Log Message: Fixed Mantis #2453: JvGnuGetText - mem leak Index: JvGnugettext.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/common/JvGnugettext.pas,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JvGnugettext.pas 11 Jul 2004 12:20:30 -0000 1.3 --- JvGnugettext.pas 31 Dec 2004 10:53:20 -0000 1.4 *************** *** 1670,1687 **** // Iterate through filesystem more := FindFirst(Directory + '*', faAnyFile, sr) = 0; ! while more do ! begin ! if (sr.Attr and faDirectory <> 0) and (sr.Name <> '.') and (sr.Name <> '..') then begin ! Filename := Directory + sr.Name + PathDelim + 'LC_MESSAGES' + ! PathDelim + domain + '.mo'; ! if FileExists(Filename) then begin ! LangCode := LowerCase(sr.Name); ! if List.IndexOf(LangCode) = -1 then ! List.Add(LangCode); end; end; ! more := FindNext(sr) = 0; end; --- 1670,1691 ---- // Iterate through filesystem more := FindFirst(Directory + '*', faAnyFile, sr) = 0; ! try ! while more do begin ! if (sr.Attr and faDirectory <> 0) and (sr.Name <> '.') and (sr.Name <> '..') then begin ! Filename := Directory + sr.Name + PathDelim + 'LC_MESSAGES' + ! PathDelim + domain + '.mo'; ! if FileExists(Filename) then ! begin ! LangCode := LowerCase(sr.Name); ! if List.IndexOf(LangCode) = -1 then ! List.Add(LangCode); ! end; end; + more := FindNext(sr) = 0; end; ! finally ! FindClose(sr); end; |