about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-03-10 09:34:42 +0100
committerGitHub <noreply@github.com>2021-03-10 09:34:42 +0100
commit0daa7f4a82c1b4cda96a9efbf1a673d5aa06d4ef (patch)
tree7311f5a5f6299094c838b0d1386ccbee6bd197f5
parenta4ec8530a99b054d44a0a5f66562d0512c2ca0e2 (diff)
parent1576ac11cbfddd15e5e0e31e5dcb0df5d57c2b5c (diff)
downloadprofani-tty-0daa7f4a82c1b4cda96a9efbf1a673d5aa06d4ef.tar.gz
Merge pull request #1498 from mwuttke97/send_file_remove_protocol
Remove "file://" from file names
-rw-r--r--src/common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common.c b/src/common.c
index 75139676..6defa7c1 100644
--- a/src/common.c
+++ b/src/common.c
@@ -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 {