Commit 5b71e838 authored by Marc Vef's avatar Marc Vef
Browse files

Merge branch 'fix_string_back' into 'master'

bugfix: check empty string on has_trailing_slash

Closes #84

See merge request zdvresearch_bsc/adafs!113
parents 8af73fa1 4991c4bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ bool is_absolute_path(const std::string& path) {
}

bool has_trailing_slash(const std::string& path) {
    return path.back() == PSP;
    return (!path.empty()) && (path.back() == PSP);
}

/* Add path prefix to a given C string.