]> git.lyx.org Git - lyx.git/blobdiff - src/support/FileName.cpp
* get rid of support::absolutePath()
[lyx.git] / src / support / FileName.cpp
index 29049c2ca7cab74fc4aa2c3f0f631f9f90bfc2cb..780a4610fac618925fe75eb5ac8e79a3565d7084 100644 (file)
@@ -17,7 +17,6 @@
 #include "support/debug.h"
 #include "support/filetools.h"
 #include "support/lstrings.h"
-#include "support/lyxlib.h"
 #include "support/os.h"
 #include "support/Package.h"
 #include "support/qstring_helpers.h"
@@ -141,6 +140,12 @@ bool FileName::empty() const
 }
 
 
+bool FileName::isAbsolute() const
+{
+       return d->fi.isAbsolute();
+}
+
+
 string FileName::absFilename() const
 {
        return fromqstr(d->fi.absoluteFilePath());
@@ -422,7 +427,7 @@ extern unsigned long sum(char const * file);
 unsigned long FileName::checksum() const
 {
        if (!exists()) {
-               LYXERR0("File \"" << absFilename() << "\" does not exist!");
+               //LYXERR0("File \"" << absFilename() << "\" does not exist!");
                return 0;
        }
        // a directory may be passed here so we need to test it. (bug 3622)
@@ -852,8 +857,9 @@ DocFileName::DocFileName(FileName const & abs_filename, bool save_abs)
 
 void DocFileName::set(string const & name, string const & buffer_path)
 {
-       save_abs_path_ = absolutePath(name);
-       FileName::set(save_abs_path_ ? name : makeAbsPath(name, buffer_path).absFilename());
+       FileName::set(name);
+       if (!isAbsolute())
+               FileName::set(makeAbsPath(name, buffer_path).absFilename());
        zipped_valid_ = false;
 }