Private(string const & abs_filename) : fi(toqstr(abs_filename))
{
- name = abs_filename;
+ name = fromqstr(fi.absoluteFilePath());
fi.setCaching(fi.exists() ? true : false);
}
///
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), /**/);
}
return dirlist;
}
- QDir dir = d->fi.absoluteDir();
+ // If the directory is specified without a trailing '/', absoluteDir()
+ // would return the parent dir, so we must use absoluteFilePath() here.
+ QDir dir = d->fi.absoluteFilePath();
if (!ext.empty()) {
QString filter;