about summary refs log tree commit diff stats
path: root/src/common.c
diff options
context:
space:
mode:
authorJohn Hernandez <129467592+H3rnand3zzz@users.noreply.github.com>2023-04-19 14:19:47 +0200
committerJohn Hernandez <129467592+H3rnand3zzz@users.noreply.github.com>2023-05-16 15:57:07 +0200
commit95e06ad16955f3b49c117cc6f2d53bf4da747154 (patch)
tree91738ed4485940d4d9fcb4fcd97caa391db82fda /src/common.c
parent9a68aab01149c9781b899d482eb2c34f2cdf505c (diff)
downloadprofani-tty-95e06ad16955f3b49c117cc6f2d53bf4da747154.tar.gz
Add url support (downloading) to `/plugins install`
Additional changes include code refactoring.
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common.c b/src/common.c
index 29fd62cb..1ba27a63 100644
--- a/src/common.c
+++ b/src/common.c
@@ -546,7 +546,7 @@ _has_directory_suffix(const char* path)
 }
 
 char*
-_basename_from_url(const char* url)
+basename_from_url(const char* url)
 {
     const char* default_name = "index";
 
@@ -595,7 +595,7 @@ unique_filename_from_url(const char* url, const char* path)
     if (_has_directory_suffix(realpath) || g_file_test(realpath, G_FILE_TEST_IS_DIR)) {
         // The target should be used as a directory. Assume that the basename
         // should be derived from the URL.
-        char* basename = _basename_from_url(url);
+        char* basename = basename_from_url(url);
         filename = g_build_filename(g_file_peek_path(target), basename, NULL);
         g_free(basename);
     } else {