From 43fb5e13400f744bdbc41354b0181925237dc7f9 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Tue, 22 Feb 2022 18:29:20 +0100 Subject: [PATCH] Do not expand "~" if it is not terminated by "/" (#3997) --- src/support/GTools.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/support/GTools.cpp b/src/support/GTools.cpp index 714a5a5..061ec64 100644 --- a/src/support/GTools.cpp +++ b/src/support/GTools.cpp @@ -289,7 +289,7 @@ std::string gammalib::expand_env(const std::string& arg) // If termination delimiter has been found then expand the // environment variable - if (i_end < result.length() || delim_idx == 4 || delim_idx == 5) { + if (i_end < result.length() || delim_idx == 4) { // Extract environment variable name std::string name = result.substr(i_start, i_end-i_start); -- libgit2 0.21.4