diff options
author | Christian Mauderer <christian.mauderer@embedded-brains.de> | 2021-12-01 16:39:46 +0100 |
---|---|---|
committer | Christian Mauderer <christian.mauderer@embedded-brains.de> | 2021-12-09 08:23:47 +0100 |
commit | ffc57e3cf33ec0e2cc51ce214cedc24f390a7ea5 (patch) | |
tree | 210db2da29d65be56aff24dfc737c036a8707854 /testsuites/libtests/tar01/tar01.doc | |
parent | score: Fix _Workspace_Initialize_for_one_area() (diff) | |
download | rtems-ffc57e3cf33ec0e2cc51ce214cedc24f390a7ea5.tar.bz2 |
untar: Make behavior similar to GNU or BSD tar
RTEMS untar implementation had problems with overwriting or integrating
archives into existing directory structures. This patch adapts the
behavior to mimic that of a GNU tar or BSD tar and extends the tar01
test to check for the behavior. That is:
* If a directory structure exists, the files from the archive will be
integrated. Existing files are overwritten.
* If a file exists and the archive contains a directory with the same
name, the file is removed and a directory is created. In the above
example: if l1/l2 is a file it will be overwritten with a new
directory.
* If a directory exists and the archive contains a file with the same
name, the directory will be replaced if it is empty. If it contains
files, the result is an error.
* An archive also can contain only a file without the parent
directories. If in that case one of the parent directories exists as a
file extracting the archive results in an error. In the example: if
l1/l2 is a file and the archive doesn't contain the directories but
only the file l1/l2/x.txt that would be an error.
* In case of an error, it is possible that the archive has been
partially extracted.
Closes #4568
Diffstat (limited to '')
-rw-r--r-- | testsuites/libtests/tar01/tar01.doc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/testsuites/libtests/tar01/tar01.doc b/testsuites/libtests/tar01/tar01.doc index 060f98a813..adffdca291 100644 --- a/testsuites/libtests/tar01/tar01.doc +++ b/testsuites/libtests/tar01/tar01.doc @@ -20,3 +20,4 @@ directives: concepts: + exercise these routines ++ check whether existing files are overwritten or not overwritten like expected |