+2005-08-31 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
+
+ * filetools.C (MakeDisplayPath): fix bug when HOME is empty.
+
+ * lstrings.C (subst): the string to be replaced should not be empty.
+
2005-07-17 Michael Schmitt <michael.schmitt@teststep.org>
* package.C.in:
2005-07-14 Angus Leeming <leeming@lyx.org>
* filename.[Ch] (mangledFilename): add an optional "dir" parameter
- that is used to help determine the length of the mangled file name.
- Do this because MiKTeX's YAP (version 2.4.1803) will crash if the string
- referencing the file name in the .dvi file is "too long". MikTeX bug:
+ that is used to help determine the length of the mangled file
+ name. Do this because MiKTeX's YAP (version 2.4.1803) will crash
+ if the string referencing the file name in the .dvi file is "too
+ long". MikTeX bug:
http://sourceforge.net/tracker/index.php?func=detail&aid=1238065&group_id=10783&atid=110783
2005-07-10 Georg Baum <Georg.Baum@post.rwth-aachen.de>
string const home = package().home_dir();
// replace /home/blah with ~/
- if (prefixIs(str, home))
+ if (!home.empty() && prefixIs(str, home))
str = subst(str, home, "~");
if (str.length() <= threshold)
string const subst(string const & a,
string const & oldstr, string const & newstr)
{
+ BOOST_ASSERT(!oldstr.empty());
string lstr = a;
string::size_type i = 0;
string::size_type const olen = oldstr.length();