X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXVC.cpp;h=4dbcfd2675f5041bda2285e6950f266cc2fee87a;hb=0a93c9b70f861b12e27239167d9ba59ddd6ece1e;hp=19f265cc67ad10aafa21598edca0d6241b0e3cd5;hpb=41843646b7e0133227ad14db4f33b2d9d7e4d156;p=lyx.git diff --git a/src/LyXVC.cpp b/src/LyXVC.cpp index 19f265cc67..4dbcfd2675 100644 --- a/src/LyXVC.cpp +++ b/src/LyXVC.cpp @@ -25,6 +25,7 @@ #include "support/filetools.h" #include "support/gettext.h" #include "support/lstrings.h" +#include "support/TempFile.h" using namespace std; using namespace lyx::support; @@ -327,7 +328,6 @@ string LyXVC::toggleReadOnly() return log; } case VCS::NOLOCKING: - case VCS::UNVERSIONED: break; } return string(); @@ -337,7 +337,7 @@ string LyXVC::toggleReadOnly() bool LyXVC::inUse() const { if (vcs) - return vcs->status() != VCS::UNVERSIONED; + return true; return false; } @@ -363,7 +363,9 @@ string const LyXVC::getLogFile() const if (!vcs) return string(); - FileName const tmpf = FileName::tempName("lyxvclog"); + TempFile tempfile("lyxvclog"); + tempfile.setAutoRemove(false); + FileName const tmpf = tempfile.name(); if (tmpf.empty()) { LYXERR(Debug::LYXVC, "Could not generate logfile " << tmpf); return string();