From 9c2fdd5f6727ea5fde8e905e0c3227ce81548adf Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 14 Apr 2018 21:34:24 +0200 Subject: [PATCH] strip trailing seps --- ostd/path.hh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ostd/path.hh b/ostd/path.hh index c545596..c06c1dc 100644 --- a/ostd/path.hh +++ b/ostd/path.hh @@ -345,6 +345,10 @@ private: } p_path.append(s); } + /* strip trailing separator */ + if ((p_path.length() > 1) && (p_path.back() == sep)) { + p_path.pop_back(); + } } void convert_path() {