]> git.lyx.org Git - lyx.git/blobdiff - src/LyXVC.cpp
Store ASCII data in std::string
[lyx.git] / src / LyXVC.cpp
index 19f265cc67ad10aafa21598edca0d6241b0e3cd5..4dbcfd2675f5041bda2285e6950f266cc2fee87a 100644 (file)
@@ -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();