]> git.lyx.org Git - lyx.git/blobdiff - src/support/FileName.cpp
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / support / FileName.cpp
index c855d4a7e5b31f5cd28854ac46a585f09bfc02e5..fb30988f9b6ace37de1c23f99c4435b6f9a6f7d1 100644 (file)
@@ -28,7 +28,7 @@
 #include <QList>
 #include <QTime>
 
-#include <boost/assert.hpp>
+#include "support/assert.h"
 #include <boost/scoped_array.hpp>
 
 #include <map>
@@ -155,7 +155,6 @@ string FileName::absFilename() const
 void FileName::set(string const & name)
 {
        d->fi.setFile(toqstr(name));
-       BOOST_ASSERT(d->fi.isAbsolute());
 }
 
 
@@ -262,13 +261,15 @@ bool FileName::isReadableDirectory() const
 
 string FileName::onlyFileName() const
 {
-       return support::onlyFilename(absFilename());
+       return fromqstr(d->fi.fileName());
 }
 
 
 FileName FileName::onlyPath() const
 {
-       return FileName(support::onlyPath(absFilename()));
+       FileName path;
+       path.d->fi.setFile(d->fi.path());
+       return path;
 }
 
 
@@ -522,14 +523,14 @@ static int mymkdir(char const * pathname, unsigned long int mode)
 
 bool FileName::createDirectory(int permission) const
 {
-       BOOST_ASSERT(!empty());
+       LASSERT(!empty(), /**/);
        return mymkdir(toFilesystemEncoding().c_str(), permission) == 0;
 }
 
 
 bool FileName::createPath() const
 {
-       BOOST_ASSERT(!empty());
+       LASSERT(!empty(), /**/);
        if (isDirectory())
                return true;