Commit 7532f24d authored by Max Kellermann's avatar Max Kellermann

ConfigPath: skip the slash of "~/"

Increment the "path" earlier.
parent 69a5df2f
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment