]> git.lyx.org Git - lyx.git/blobdiff - src/support/FileName.cpp
an example for the sweave module, prepared by Gregor Gorjanc
[lyx.git] / src / support / FileName.cpp
index bb99d1788ff63b19f6258fa9f97b0480628288a4..2a1815ec5b03a8468d3cbcd3c9db6de49994dc48 100644 (file)
@@ -105,7 +105,7 @@ struct FileName::Private
 
        Private(string const & abs_filename) : fi(toqstr(abs_filename))
        {
-               name = abs_filename;
+               name = fromqstr(fi.absoluteFilePath());
                fi.setCaching(fi.exists() ? true : false);
        }
        ///
@@ -212,8 +212,8 @@ string FileName::realPath() const
 
 void FileName::set(string const & name)
 {
-       d->name = name;
        d->fi.setFile(toqstr(name));
+       d->name = fromqstr(d->fi.absoluteFilePath());
        //LYXERR(Debug::FILES, "FileName::set(" << name << ')');
        LASSERT(empty() || isAbsolute(d->name), /**/);
 }