summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--raul/Path.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/raul/Path.hpp b/raul/Path.hpp
index ea5b4b2..b6b0b60 100644
--- a/raul/Path.hpp
+++ b/raul/Path.hpp
@@ -75,7 +75,8 @@ public:
static bool is_valid(const std::basic_string<char>& path);
static bool is_valid_name(const std::basic_string<char>& name) {
- return name.length() > 0 && is_valid(std::string("/").append(name));
+ return name.length() > 0 && name.find("/") == std::string::npos
+ && is_valid(std::string("/").append(name));
}
static std::string pathify(const std::basic_string<char>& str);