summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2004-03-06 01:05:32 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2004-03-06 01:05:32 +0000
commitbca59216f7ffb256eb48561b5cfc552166145966 (patch)
tree152c719b5ac7d877522326c6b689a8a6f2201fe9 /lib
parent7ed404091046936781e795a9689776bf5cf30cf0 (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libarchive/archive.h1
-rw-r--r--lib/libarchive/archive.h.in1
-rw-r--r--lib/libarchive/archive_read.35
3 files changed, 7 insertions, 0 deletions
diff --git a/lib/libarchive/archive.h b/lib/libarchive/archive.h
index 54fafcba9bb0..6a3b92e8a836 100644
--- a/lib/libarchive/archive.h
+++ b/lib/libarchive/archive.h
@@ -190,6 +190,7 @@ ssize_t archive_read_data_into_fd(struct archive *, int fd);
#define ARCHIVE_EXTRACT_PERM (2) /* Default: restore perm only for reg file*/
#define ARCHIVE_EXTRACT_TIME (4) /* Default: mod time not restored */
#define ARCHIVE_EXTRACT_NO_OVERWRITE (8) /* Default: Replace files on disk */
+#define ARCHIVE_EXTRACT_UNLINK (16) /* Default: don't unlink existing files */
int archive_read_extract(struct archive *, struct archive_entry *,
int flags);
diff --git a/lib/libarchive/archive.h.in b/lib/libarchive/archive.h.in
index 54fafcba9bb0..6a3b92e8a836 100644
--- a/lib/libarchive/archive.h.in
+++ b/lib/libarchive/archive.h.in
@@ -190,6 +190,7 @@ ssize_t archive_read_data_into_fd(struct archive *, int fd);
#define ARCHIVE_EXTRACT_PERM (2) /* Default: restore perm only for reg file*/
#define ARCHIVE_EXTRACT_TIME (4) /* Default: mod time not restored */
#define ARCHIVE_EXTRACT_NO_OVERWRITE (8) /* Default: Replace files on disk */
+#define ARCHIVE_EXTRACT_UNLINK (16) /* Default: don't unlink existing files */
int archive_read_extract(struct archive *, struct archive_entry *,
int flags);
diff --git a/lib/libarchive/archive_read.3 b/lib/libarchive/archive_read.3
index c2d2c3d747d0..c5bd04e716c8 100644
--- a/lib/libarchive/archive_read.3
+++ b/lib/libarchive/archive_read.3
@@ -178,6 +178,11 @@ Note that restoring of atime is not currently supported.
.It Cm ARCHIVE_EXTRACT_NO_OVERWRITE
Existing files on disk will not be overwritten.
By default, existing files are unlinked before the new entry is written.
+.It Cm ARCHIVE_EXTRACT_UNLINK
+Existing files on disk will be unlinked and recreated from scratch.
+By default, existing files are truncated and rewritten, but
+the file is not recreated.
+In particular, the default behavior does not break existing hard links.
.El
.It Fn archive_read_finish
Complete the archive, invoke the close callback, and release