mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Merge pull request #1498 from mwuttke97/send_file_remove_protocol
Remove "file://" from file names
This commit is contained in:
commit
0daa7f4a82
@ -577,6 +577,9 @@ get_expanded_path(const char* path)
|
||||
GString* exp_path = g_string_new("");
|
||||
gchar* result;
|
||||
|
||||
if (g_str_has_prefix(path, "file://")) {
|
||||
path += strlen("file://");
|
||||
}
|
||||
if (strlen(path) >= 2 && path[0] == '~' && path[1] == '/') {
|
||||
g_string_printf(exp_path, "%s/%s", getenv("HOME"), path + 2);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user