]> git.lyx.org Git - lyx.git/blobdiff - src/LyXVC.cpp
saner borderline between buffer and exporter
[lyx.git] / src / LyXVC.cpp
index cb82337f72776c420c75bc20479edf58ab28b373..3538352bf12bf546d2b68256f9e9188a8f118071 100644 (file)
@@ -31,7 +31,6 @@ namespace lyx {
 
 using support::bformat;
 using support::FileName;
-using support::isFileReadable;
 using support::makeAbsPath;
 using support::makeDisplayPath;
 using support::tempName;
@@ -93,10 +92,10 @@ void LyXVC::buffer(Buffer * buf)
 
 void LyXVC::registrer()
 {
-       FileName const filename(owner_->fileName());
+       FileName const filename(owner_->absFileName());
 
        // there must be a file to save
-       if (!isFileReadable(filename)) {
+       if (!filename.isFileReadable()) {
                Alert::error(_("Document not saved"),
                             _("You must save the document "
                                            "before it can be registered."));
@@ -107,7 +106,7 @@ void LyXVC::registrer()
        if (!vcs) {
                FileName const cvs_entries(makeAbsPath("CVS/Entries"));
 
-               if (isFileReadable(cvs_entries)) {
+               if (cvs_entries.isFileReadable()) {
                        LYXERR(Debug::LYXVC)
                                << "LyXVC: registering "
                                << to_utf8(makeDisplayPath(filename.absFilename()))
@@ -167,7 +166,7 @@ void LyXVC::revert()
 {
        LYXERR(Debug::LYXVC) << "LyXVC: revert" << endl;
 
-       docstring const file = makeDisplayPath(owner_->fileName(), 20);
+       docstring const file = makeDisplayPath(owner_->absFileName(), 20);
        docstring text = bformat(_("Reverting to the stored version of the "
                "document %1$s will lose all current changes.\n\n"
                                             "Do you want to revert to the saved version?"), file);