summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/strings.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/strings.nix b/lib/strings.nix
index 1eb6cf9c1afb..df891c899887 100644
--- a/lib/strings.nix
+++ b/lib/strings.nix
@@ -629,10 +629,10 @@ rec {
This behavior is deprecated and will throw an error in the future.''
(let
preLen = stringLength prefix;
- sLen = stringLength str;
in
if substring 0 preLen str == prefix then
- substring preLen (sLen - preLen) str
+ # -1 will take the string until the end
+ substring preLen (-1) str
else
str);