aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gpgtar-extract.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tools/gpgtar-extract.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/gpgtar-extract.c b/tools/gpgtar-extract.c
index b0e17cb10..8613d193f 100644
--- a/tools/gpgtar-extract.c
+++ b/tools/gpgtar-extract.c
@@ -345,21 +345,21 @@ gpgtar_extract (const char *filename, int decrypt)
dirname = xtrystrdup (opt.directory);
else
{
- if (filename)
+ if (opt.filename)
{
- dirprefix = strrchr (filename, '/');
+ dirprefix = strrchr (opt.filename, '/');
if (dirprefix)
dirprefix++;
else
- dirprefix = filename;
+ dirprefix = opt.filename;
}
- else if (opt.filename)
+ else if (filename)
{
- dirprefix = strrchr (opt.filename, '/');
+ dirprefix = strrchr (filename, '/');
if (dirprefix)
dirprefix++;
else
- dirprefix = opt.filename;
+ dirprefix = filename;
}
if (!dirprefix || !*dirprefix)