diff options
author | fanf <fanf@FreeBSD.org> | 2002-10-20 14:18:25 +0000 |
---|---|---|
committer | fanf <fanf@FreeBSD.org> | 2002-10-20 14:18:25 +0000 |
commit | 9a04c30aaa81a0ef162a890502c4f88b338b6f43 (patch) | |
tree | 9a5943150700a5a607ed520858dc6014ec7cff97 | |
parent | e5e93f10fa978f3c6095dc1cce03baaac3bbf595 (diff) | |
download | FreeBSD-src-9a04c30aaa81a0ef162a890502c4f88b338b6f43.zip FreeBSD-src-9a04c30aaa81a0ef162a890502c4f88b338b6f43.tar.gz |
Improve the way base64 mode is enabled based on the program name,
so that it works when the path to b64encode is used to run it.
-rw-r--r-- | usr.bin/uuencode/uuencode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/uuencode/uuencode.c b/usr.bin/uuencode/uuencode.c index 5461d0e..e9225d4 100644 --- a/usr.bin/uuencode/uuencode.c +++ b/usr.bin/uuencode/uuencode.c @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include <netinet/in.h> #include <err.h> +#include <libgen.h> #include <resolv.h> #include <stdio.h> #include <stdlib.h> @@ -83,7 +84,7 @@ main(int argc, char *argv[]) base64 = 0; outfile = NULL; - if (strcmp(argv[0], "b64encode") == 0) + if (strcmp(basename(argv[0]), "b64encode") == 0) base64 = 1; while ((ch = getopt(argc, argv, "mo:")) != -1) { |