Add Windows support to MBTiles file source (#905)
This commit is contained in:
13
platform/default/src/mbgl/util/filesystem.cpp
Normal file
13
platform/default/src/mbgl/util/filesystem.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <mbgl/util/filesystem.hpp>
|
||||
|
||||
#if defined(USE_STD_FILESYSTEM)
|
||||
#include <filesystem>
|
||||
|
||||
bool mbgl::util::is_absolute_path(std::string path) {
|
||||
return std::filesystem::path(path).is_absolute();
|
||||
}
|
||||
#else
|
||||
bool mbgl::util::is_absolute_path(std::string path) {
|
||||
return path.at(0) == '/';
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user