Another attempt at #8295.

This bug occur only at certain Qt versions and systems and we do
not really understand what is going on.

Quoting Stephan - the parent path of "." e.g. never should be ".".
The inconsistency between the name of FileName and the internal QFileInfo
state looks very dangerous.
This commit is contained in:
Pavel Sanda 2012-08-16 20:12:49 +02:00
parent ff36733b8b
commit f4fe5a8fa0

View File

@ -100,12 +100,13 @@ bool VCS::makeRCSRevision(string const &version, string &revis) const
bool VCS::checkparentdirs(FileName const & file, std::string const & pathname)
{
FileName dirname = FileName(file.absFileName()).onlyPath();
FileName dirname = file.onlyPath();
FileName tocheck = FileName(addName(dirname.absFileName(),pathname));
LYXERR(Debug::LYXVC, "check file: " << tocheck.absFileName());
bool result = tocheck.exists();
while ( !result && !dirname.empty() ) {
dirname = dirname.parentPath();
//this construct because of #8295
dirname = FileName(dirname.absFileName()).parentPath();
LYXERR(Debug::LYXVC, "check directory: " << dirname.absFileName());
tocheck = FileName(addName(dirname.absFileName(),pathname));
result = tocheck.exists();