diff --git a/src/support/ChangeLog b/src/support/ChangeLog index d376e2589c..c23dce4c64 100644 --- a/src/support/ChangeLog +++ b/src/support/ChangeLog @@ -1,3 +1,7 @@ +2002-11-27 Lars Gullik Bjønnes + + * filetools.C (DirList): remove all ugly hacks and do it nice + 2002-11-13 Jean-Marc Lasgouttes * lyxsum.C: an ugly hack to compile with non-gnu linkers diff --git a/src/support/filetools.C b/src/support/filetools.C index 4cb71a7d80..e2602bd759 100644 --- a/src/support/filetools.C +++ b/src/support/filetools.C @@ -211,9 +211,11 @@ string const FileOpenSearch(string const & path, string const & name, vector const DirList(string const & dir, string const & ext) { // This is a non-error checking C/system implementation - string extension(ext); - if (!extension.empty() && extension[0] != '.') - extension.insert(string::size_type(0), 1, '.'); + string extension; + if (!ext.empty() && ext[0] != '.') + extension += '.'; + extension += ext; + vector dirlist; DIR * dirp = ::opendir(dir.c_str()); if (!dirp) {