Fix path assertions for windows

This commit is contained in:
Sebastian Messmer 2018-07-30 00:42:51 -07:00
parent 0016438fd9
commit dc83bde24d

View File

@ -21,7 +21,7 @@ bool is_valid_fspp_path(const bf::path& path) {
// TODO In boost 1.63, we can use path.generic() or path.generic_path() instead of path.generic_string() // TODO In boost 1.63, we can use path.generic() or path.generic_path() instead of path.generic_string()
return path.has_root_directory() // must be absolute path return path.has_root_directory() // must be absolute path
&& !path.has_root_name() // on Windows, it shouldn't have a device specifier (i.e. no "C:") && !path.has_root_name() // on Windows, it shouldn't have a device specifier (i.e. no "C:")
&& (path.c_str() == path.generic_string()); // must use portable '/' as directory separator && (path.string() == path.generic_string()); // must use portable '/' as directory separator
} }
} }