#2413: Untar_FromMemory breaks on create directory if they exists, even on root
one.
---------------------+-------------------
Reporter: ppisa | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 4.11
Component: General | Version: 4.11
Severity: normal | Resolution:
Keywords: |
---------------------+-------------------
Comment (by chrisj):
I do not think the patch is enough. For example on OS X:
{{{
$ rm -rf x && mkdir x && mkdir x/1 && touch x/1/1 touch x/2 && tar cf
t1.tar x
$ rm -rf x && mkdir x && mkdir x/2 && touch x/2/1 touch x/1 && tar cf
t2.tar x
$ rm -rf x && tar xf t1.tar && tar xf t2.tar
x/1: Can't remove already-existing dir
tar: Error exit delayed from previous errors.
}}}
and on FreeBSD:
{{{
$ rm -rf x && mkdir x && mkdir x/1 && touch x/1/1 touch x/2 && tar cf
t1.tar x
$ rm -rf x && mkdir x && mkdir x/2 && touch x/2/1 touch x/1 && tar cf
t2.tar x
$ rm -rf x && tar xf t1.tar && tar xf t2.tar
x/1: Can't replace existing directory with non-directory
tar: Error exit delayed from previous errors.
}}}
I think we need to add more checking and error if nodes are not the same.
I cannot see a way around this.
The current implementation is overly cautious and it has made me move away
a direction and untar a fresh image. In the end I think it is better as
stray files do not hang around. I would rather we handle the special cases
correctly or not at all.
--
Ticket URL: <http://devel.rtems.org/ticket/2413#comment:2>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs