summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2013-05-25 14:55:38 +0200
committerportix <portix@gmx.net>2013-05-25 14:55:38 +0200
commit8be99288038928117bf5e2de6f2fffb20a376f7d (patch)
tree3af22c8716bff8cb4c583a29085e35573d8ab4b0
parenta06a7081039cb5aa7aa13198af6fba4bebbd7842 (diff)
downloaddwb-8be99288038928117bf5e2de6f2fffb20a376f7d.zip
Fixing exar delete for directories, adding --archive to manpage
-rw-r--r--doc/dwbem.113
-rw-r--r--doc/dwbem.1.txt4
-rw-r--r--exar/exar.c11
3 files changed, 21 insertions, 7 deletions
diff --git a/doc/dwbem.1 b/doc/dwbem.1
index 2f90071b..307df978 100644
--- a/doc/dwbem.1
+++ b/doc/dwbem.1
@@ -1,13 +1,13 @@
'\" t
.\" Title: dwbem
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
-.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
-.\" Date: 02/01/2013
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 05/25/2013
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
-.TH "DWBEM" "1" "02/01/2013" "\ \&" "\ \&"
+.TH "DWBEM" "1" "05/25/2013" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -174,6 +174,13 @@ Update
in combination with
\fB\-\-no\-confirm\fR\&.
.RE
+.PP
+\fB\-\-archive\fR
+.RS 4
+Create, unpack or manipulate extension archives, use
+\fIdwbem \-\-archive h\fR
+for detailed information\&.
+.RE
.SH "ENVIRONMENT VARIABLES"
.sp
\fBdwbem\fR expects the environment variables \fIEDITOR\fR and \fIDIFF_VIEWER\fR to be set, if they are unset \fIvim\fR and \fIvimdiff\fR are used respectively\&. \fIEDITOR\fR needs to be set if the configuration is edited or a new extension is installed, \fIDIFF_VIEWER\fR needs to be set if extensions are updated\&.
diff --git a/doc/dwbem.1.txt b/doc/dwbem.1.txt
index d7df0c7b..2a337eb5 100644
--- a/doc/dwbem.1.txt
+++ b/doc/dwbem.1.txt
@@ -112,6 +112,10 @@ OPTIONS
the configuration has been changed after using *--upgrade* in combination
with *--no-confirm*.
+*--archive*::
+ Create, unpack or manipulate extension archives, use 'dwbem --archive h' for
+ detailed information.
+
ENVIRONMENT VARIABLES
---------------------
diff --git a/exar/exar.c b/exar/exar.c
index 84cfe929..8a01c863 100644
--- a/exar/exar.c
+++ b/exar/exar.c
@@ -132,7 +132,7 @@ check_version(FILE *f, int verbose)
return EE_ERROR;
}
- LOG(1, "Found version %s\n", version);
+ LOG(2, "Found version %s\n", version);
if (memcmp(version, orig_version, SZ_VERSION))
{
if (verbose)
@@ -589,10 +589,13 @@ exar_delete(const char *archive, const char *file)
else if (header.eh_flag == DIR_FLAG)
dir_length = snprintf(dir_name, sizeof(dir_name), "%s/", header.eh_name);
}
- else if (*dir_name && strncmp(dir_name, header.eh_name, dir_length) == 0 && header.eh_flag == FILE_FLAG)
+ else if (*dir_name && strncmp(dir_name, header.eh_name, dir_length) == 0)
{
- LOG(1, "Skipping %s\n", header.eh_name);
- fseek(f, header.eh_size, SEEK_CUR);
+ if (header.eh_flag == FILE_FLAG)
+ {
+ LOG(1, "Skipping %s\n", header.eh_name);
+ fseek(f, header.eh_size, SEEK_CUR);
+ }
}
else
{