File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333// obligated to do so. If you do not wish to do so, delete this
3434// exception statement from your version.
3535
36+ // HISTORY
37+ // 28-01-2010 DavidPierson Added IsStreamOwner
38+
3639using System ;
3740using System . IO ;
3841using System . Text ;
@@ -470,6 +473,20 @@ public int RecordSize {
470473 }
471474 }
472475
476+ /// <summary>
477+ /// Sets the IsStreamOwner property on the underlying stream.
478+ /// Set this to false to prevent the Close of the TarArchive from closing the stream.
479+ /// </summary>
480+ public bool IsStreamOwner {
481+ set {
482+ if ( tarIn != null ) {
483+ tarIn . IsStreamOwner = value ;
484+ } else {
485+ tarOut . IsStreamOwner = value ;
486+ }
487+ }
488+ }
489+
473490 /// <summary>
474491 /// Close the archive.
475492 /// </summary>
@@ -540,7 +557,7 @@ void ExtractEntry(string destDir, TarEntry entry)
540557
541558 string name = entry . Name ;
542559
543- if ( Path . IsPathRooted ( name ) == true ) {
560+ if ( Path . IsPathRooted ( name ) ) {
544561 // NOTE:
545562 // for UNC names... \\machine\share\zoom\beet.txt gives \zoom\beet.txt
546563 name = name . Substring ( Path . GetPathRoot ( name ) . Length ) ;
You can’t perform that action at this time.
0 commit comments