Fix thinko in loop detection

This commit is contained in:
Georg Baum 2014-06-09 22:06:58 +02:00
parent f792e70d0a
commit f76d6997b7

View File

@ -220,7 +220,6 @@ void FileName::erase()
bool FileName::copyTo(FileName const & name, bool keepsymlink) const
{
FileNameSet visited;
visited.insert(*this);
return copyTo(name, keepsymlink, visited);
}
@ -230,6 +229,7 @@ bool FileName::copyTo(FileName const & name, bool keepsymlink,
{
LYXERR(Debug::FILES, "Copying " << name << " keep symlink: " << keepsymlink);
if (keepsymlink && name.isSymLink()) {
visited.insert(*this);
FileName const target(fromqstr(name.d->fi.symLinkTarget()));
if (visited.find(target) != visited.end()) {
LYXERR(Debug::FILES, "Found circular symlink: " << target);