diff options
author | David Robillard <d@drobilla.net> | 2008-12-21 23:31:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-12-21 23:31:24 +0000 |
commit | 5a2863081e4bb3397f66e098d278bdcbfb493ba0 (patch) | |
tree | 4585ce3122c2861aeba94c351b457710450f7e3c | |
parent | 1f173010b87ce43da9c3635ffda96629a5beef40 (diff) | |
download | raul-5a2863081e4bb3397f66e098d278bdcbfb493ba0.tar.gz raul-5a2863081e4bb3397f66e098d278bdcbfb493ba0.tar.bz2 raul-5a2863081e4bb3397f66e098d278bdcbfb493ba0.zip |
Make Path::is_valid_name reject names containing a slash (fix ticket #313).
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@1896 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | raul/Path.hpp | 3 |
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); |