aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqorg11 <qorg@vxempire.xyz>2021-06-26 12:13:03 +0200
committerqorg11 <qorg@vxempire.xyz>2021-06-26 12:13:03 +0200
commit9835aec85ad659490197891767c4e0bec373a169 (patch)
tree8f40156647fc6b42f3c1c86596d80dde5b110f32
parentf41db5bfb040efc8c86b760bbb3962cc475de195 (diff)
downloaddemiurge-9835aec85ad659490197891767c4e0bec373a169.tar.gz
demiurge-9835aec85ad659490197891767c4e0bec373a169.zip
Added basename to the description field so you don't dox yourself if
you enter an absolute filename
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 442446d..854895d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -3,6 +3,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <getopt.h>
+#include <libgen.h>
#include "login.h"
#include "util.h"
@@ -54,7 +55,7 @@ main(int argc, char **argv)
visibility = optarg;
break;
case 'F':
- upload_file(optarg,optarg,&id_ptr);
+ upload_file(optarg,basename(optarg),&id_ptr);
break;
}