Fix the assert on Windows when starting LyX by double-clicking on a file. Do the same also for FileName::set.

see r29646--r29648.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@29671 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2009-05-14 18:01:10 +00:00
parent a96090060d
commit 976347a2f3

View File

@ -105,7 +105,7 @@ struct FileName::Private
Private(string const & abs_filename) : fi(toqstr(abs_filename))
{
name = abs_filename;
name = fromqstr(fi.absoluteFilePath());
fi.setCaching(fi.exists() ? true : false);
}
///
@ -212,8 +212,8 @@ string FileName::realPath() const
void FileName::set(string const & name)
{
d->name = name;
d->fi.setFile(toqstr(name));
d->name = fromqstr(d->fi.absoluteFilePath());
//LYXERR(Debug::FILES, "FileName::set(" << name << ')');
LASSERT(empty() || isAbsolute(d->name), /**/);
}