Ticket #35140: patch-filenameparse.cc.diff

File patch-filenameparse.cc.diff, 975 bytes (added by raphael-st (Raphael Straub), 12 years ago)
  • src/filenameparse.cc

    diff -r 152ffb1b6463 -r 6b2244bb400b src/filenameparse.cc
     
    5050#ifdef HAVE_BOOST_FILESYSTEM
    5151#include <boost/filesystem.hpp>
    5252
     53#if BOOST_FILESYSTEM_VERSION < 3
    5354typedef boost::filesystem::basic_path<std::string, boost::filesystem::path_traits> basic_path;
     55#define GETPATHSTRING(x) x
     56#else
     57typedef boost::filesystem::path basic_path;
     58#define GETPATHSTRING(x) (x).string()
     59#endif
    5460#endif
    5561
    5662
     
    95101{
    96102#ifdef HAVE_BOOST_FILESYSTEM
    97103    const basic_path path(aFilename);
    98     return path.leaf();
     104    return GETPATHSTRING(path.leaf());
    99105#else
    100106    const std::string::size_type separator = aFilename.rfind(PATH_SEPARATOR);
    101107    return
     
    179185        }
    180186        else
    181187        {
    182             directories.push_back(*p);
     188            directories.push_back(GETPATHSTRING(*p));
    183189        }
    184190    }
    185191    basic_path result;