aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ConfigPath.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ConfigPath.cxx b/src/ConfigPath.cxx
index 85739761c..c02f830c5 100644
--- a/src/ConfigPath.cxx
+++ b/src/ConfigPath.cxx
@@ -86,13 +86,13 @@ ParsePath(const char *path, Error &error)
if (path[0] == '~') {
Path home = Path::Null();
- if (path[1] == '/' || path[1] == '\0') {
+ ++path;
+
+ if (*path == '/' || *path == '\0') {
home = GetConfiguredHome(error);
++path;
} else {
- ++path;
-
const char *slash = strchr(path, '/');
char *user = slash != nullptr
? g_strndup(path, slash - path)