Bug #14311 ยป Wt-filesystem.patch
| src/Wt/WDocRootDataInfo.C | ||
|---|---|---|
|
|
||
|
#include "Wt/WDocRootDataInfo.h"
|
||
|
|
||
|
#include "Wt/cpp17/filesystem.hpp"
|
||
|
|
||
|
#include "Wt/WApplication.h"
|
||
|
#include "Wt/WException.h"
|
||
|
|
||
|
#include <boost/filesystem/path.hpp>
|
||
|
|
||
|
namespace Wt {
|
||
|
|
||
|
WDocRootDataInfo::WDocRootDataInfo(const std::string& path)
|
||
| ... | ... | |
|
std::string WDocRootDataInfo::filePath() const
|
||
|
{
|
||
|
if (hasFilePath()) {
|
||
|
boost::filesystem::path path = boost::filesystem::path(relPath_);
|
||
|
path = boost::filesystem::path(WApplication::instance()->docRoot()) / path;
|
||
|
cpp17::filesystem::path path = cpp17::filesystem::path(relPath_);
|
||
|
path = cpp17::filesystem::path(WApplication::instance()->docRoot()) / path;
|
||
|
return path.string();
|
||
|
}
|
||
|
return WAbstractDataInfo::filePath();
|
||