summaryrefslogtreecommitdiff
path: root/src/helpers/MiscFunctions.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-07-10 13:10:30 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-07-10 13:10:34 +0200
commit42f46aeac5e9d73b664f3dd8e8476f1d3c8a2827 (patch)
treeb749e6fd405979cea4433b705b36cc8e7481ddcf /src/helpers/MiscFunctions.cpp
parent4cc0e6de90844dd340108f132db014ccf8d44ba7 (diff)
config: minor path handling fixes
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
-rw-r--r--src/helpers/MiscFunctions.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp
index 1010a29e..d18c8f47 100644
--- a/src/helpers/MiscFunctions.cpp
+++ b/src/helpers/MiscFunctions.cpp
@@ -130,9 +130,9 @@ std::string absolutePath(const std::string& rawpath, const std::string& currentP
if (value[1] == '.') {
auto parentDir = currentDir.substr(0, currentDir.find_last_of('/'));
- value.replace(0, 2, parentDir);
+ value.replace(0, 2 + currentPath.empty(), parentDir);
} else {
- value.replace(0, 1, currentDir);
+ value.replace(0, 1 + currentPath.empty(), currentDir);
}
}