From f76d6997b710f7fb5180f0cd05415786de5d9417 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Mon, 9 Jun 2014 22:06:58 +0200 Subject: [PATCH] Fix thinko in loop detection --- src/support/FileName.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp index 84f13d6ae3..95880a0e79 100644 --- a/src/support/FileName.cpp +++ b/src/support/FileName.cpp @@ -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); -- 2.39.5