diff options
Diffstat (limited to 'core/path_db.cpp')
-rw-r--r-- | core/path_db.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/path_db.cpp b/core/path_db.cpp index 7545088978..d0feda5c82 100644 --- a/core/path_db.cpp +++ b/core/path_db.cpp @@ -53,6 +53,12 @@ uint32_t NodePath::hash() const { } +void NodePath::prepend_period() { + + if (data->path.size() && data->path[0].operator String()!=".") { + data->path.insert(0,"."); + } +} bool NodePath::is_absolute() const { @@ -329,7 +335,6 @@ NodePath::NodePath(const String& p_path) { Vector<StringName> subpath; int absolute=(path[0]=='/')?1:0;; - bool valid=false; bool last_is_slash=true; int slices=0; int subpath_pos=path.find(":"); @@ -373,7 +378,6 @@ NodePath::NodePath(const String& p_path) { if (last_is_slash) slices++; - valid=true; last_is_slash=false; } } |