mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-08-04 15:06:21 +00:00
Remove stray +2 for path string in get_expanded_path
This commit is contained in:
@@ -637,7 +637,7 @@ get_expanded_path(const char *path)
|
||||
if (strlen(path) >= 2 && path[0] == '~' && path[1] == '/') {
|
||||
g_string_printf(exp_path, "%s/%s", getenv("HOME"), path + 2);
|
||||
} else {
|
||||
g_string_printf(exp_path, "%s", path+2);
|
||||
g_string_printf(exp_path, "%s", path);
|
||||
}
|
||||
|
||||
result = exp_path->str;
|
||||
@@ -653,7 +653,7 @@ unique_filename_from_url(const char* url, const char* path)
|
||||
|
||||
// Default to './' as path when none has been provided.
|
||||
if (path == NULL) {
|
||||
realpath = strdup("./");
|
||||
realpath = g_strdup("./");
|
||||
} else {
|
||||
realpath = get_expanded_path(path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user