mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-25 06:36:22 +00:00
Merge pull request #1498 from mwuttke97/send_file_remove_protocol
Remove "file://" from file names
This commit is contained in:
@@ -577,6 +577,9 @@ get_expanded_path(const char* path)
|
|||||||
GString* exp_path = g_string_new("");
|
GString* exp_path = g_string_new("");
|
||||||
gchar* result;
|
gchar* result;
|
||||||
|
|
||||||
|
if (g_str_has_prefix(path, "file://")) {
|
||||||
|
path += strlen("file://");
|
||||||
|
}
|
||||||
if (strlen(path) >= 2 && path[0] == '~' && path[1] == '/') {
|
if (strlen(path) >= 2 && path[0] == '~' && path[1] == '/') {
|
||||||
g_string_printf(exp_path, "%s/%s", getenv("HOME"), path + 2);
|
g_string_printf(exp_path, "%s/%s", getenv("HOME"), path + 2);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user