Path can be empty

This commit is contained in:
Baptiste Wicht 2016-08-15 21:28:41 +02:00
parent bc3ef4e28c
commit a58c4b90fa
2 changed files with 5 additions and 0 deletions

View File

@ -15,6 +15,7 @@
* \brief Structure to represent a path on the file system
*/
struct path {
path();
path(const std::string& path);
path(const path& rhs) = default;

View File

@ -7,6 +7,10 @@
#include "vfs/path.hpp"
path::path(){
//Nothing to init
}
path::path(const std::string& path){
auto parts = std::split(path, '/');
names.reserve(parts.size());