Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ac4d898
ref: Conversion constructors
carlossanlop Jun 1, 2022
9899220
src: Conversion constructors
carlossanlop Jun 7, 2022
476bec1
tests: Conversion constructors
carlossanlop Jun 7, 2022
4484202
src: Conversion constructor should call this instead of base
carlossanlop Jun 7, 2022
45d87a0
tests: Verify unseekable stream data can be read after conversion
carlossanlop Jun 7, 2022
adf074e
Adjust _readerOfOrigin nullability in constructors.
carlossanlop Jun 7, 2022
c9002d1
Move most constructor work to the base class.
carlossanlop Jun 7, 2022
42a000d
ref: Move TarFormat from TarReader to TarEntry
carlossanlop Jun 7, 2022
ac7ff62
ref: Move Format property from TarReader to TarEntry
carlossanlop Jun 7, 2022
a0a2d88
src: Move Format property from TarReader to TarEntry
carlossanlop Jun 7, 2022
0a54727
tests: Move Format property from TarReader to TarEntry
carlossanlop Jun 7, 2022
6de8f40
nit - Remove extra spacing in tests
carlossanlop Jun 7, 2022
b6f75cb
src: When converting, only transfer fields available in the new format.
carlossanlop Jun 9, 2022
2daa87e
tests: Verify only supported fields are transferred when converting.
carlossanlop Jun 9, 2022
247af82
Revert internal->private for magic and version
carlossanlop Jun 9, 2022
270403c
Add boolean arg to PaxTarEntry method that adds atime and ctime
carlossanlop Jun 9, 2022
d405d4e
Make sure back and forth tests create firstt timestamp with a slight …
carlossanlop Jun 9, 2022
7e79e57
Make _readerOfOrigin private again
carlossanlop Jun 9, 2022
ba4d394
src: Use UtcNow, not Now
carlossanlop Jun 9, 2022
e37c645
tests: Use UtcNow, not Now. Compare converted DateTimeOffset from dou…
carlossanlop Jun 9, 2022
f987f77
Address feedback for comments.
carlossanlop Jun 11, 2022
cd66da4
Add asserts that verify mtime has a non-default value when it is expe…
carlossanlop Jun 11, 2022
c61ce71
Adress feedback for setting field values in PosixTarEntry and TarEntr…
carlossanlop Jun 11, 2022
0a39b22
Remove code that reads atime and ctime from extended attributes and s…
carlossanlop Jun 11, 2022
948b3d7
Make sure that extended attributes always have an atime and a ctime w…
carlossanlop Jun 11, 2022
131608f
Address feedback around timestamps in tests.
carlossanlop Jun 11, 2022
1b82298
Add more tests for expected values in extended attributes after writi…
carlossanlop Jun 11, 2022
ed5ec9a
Reuse code for conversion tests.
carlossanlop Jun 13, 2022
c82f766
Change test comparisons of Assert.True with ">=" to use AssertExtensi…
carlossanlop Jun 13, 2022
98e6191
Reduce number of dictionary newing, only do it when the contents are …
carlossanlop Jun 13, 2022
b7c1c83
Avoid returning dateTimeOffset != default, instead return true on suc…
carlossanlop Jun 13, 2022
83888ba
Remove redundant assignment of format to header.
carlossanlop Jun 13, 2022
e958afd
Pass Dictionary<string,string> directly to make use of non-virtual Tr…
carlossanlop Jun 13, 2022
81376fe
Add tests that verify the default writer format is utilized when call…
carlossanlop Jun 13, 2022
b865bf4
Add overload that takes long for converting number of seconds to Date…
carlossanlop Jun 13, 2022
c37e9e7
Address latest suggestions by eerhardt
carlossanlop Jun 15, 2022
526b55a
Make sure dictionary is initialized once in PaxTarEntry constructor.
carlossanlop Jun 16, 2022
2b3dff3
Reuse code for single conversion construction tests and back-n-forth …
carlossanlop Jun 16, 2022
f10d0bf
Invert verification of default case and TarEntryFormat.Unknown in swi…
carlossanlop Jun 20, 2022
a363c3f
Change "if dictionary is not null" to "Debug.Assert "dictionary is no…
carlossanlop Jun 20, 2022
cedf1a2
Conversion tests should also check expected values of ATime and CTime…
carlossanlop Jun 20, 2022
30261f3
Chop long comment, remove another 'preferred default'.
carlossanlop Jun 20, 2022
f23d244
Make unseekable conversion tests theories to verify all writer formats.
carlossanlop Jun 20, 2022
4e3e4a3
Set _prefix to Empty if other is not ustar or pax
carlossanlop Jun 20, 2022
2d503fc
Rename TarWriter archiveFormat parameter to format
carlossanlop Jun 20, 2022
411aefa
Compare datetime offsets only up to seconds
carlossanlop Jun 20, 2022
767a5e8
Increase fixed point format specifier precision, use test comparison …
carlossanlop Jun 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
src: Conversion constructor should call this instead of base
  • Loading branch information
carlossanlop committed Jun 20, 2022
commit 44842029622c0fd52b16f843722aad83209fe7e5
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public GnuTarEntry(TarEntryType entryType, string entryName)
/// Initializes a new <see cref="GnuTarEntry"/> instance by converting the specified <paramref name="other"/> entry into the GNU format.
/// </summary>
public GnuTarEntry(TarEntry other)
: base(other._header, other._readerOfOrigin!)
: this(other._header, other._readerOfOrigin!)
{
if (_header._typeFlag == TarEntryType.V7RegularFile)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public PaxTarEntry(TarEntryType entryType, string entryName, IEnumerable<KeyValu
/// Initializes a new <see cref="PaxTarEntry"/> instance by converting the specified <paramref name="other"/> entry into the PAX format.
/// </summary>
public PaxTarEntry(TarEntry other)
: base(other._header, other._readerOfOrigin!)
: this(other._header, other._readerOfOrigin!)
{
if (_header._typeFlag == TarEntryType.V7RegularFile)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public UstarTarEntry(TarEntryType entryType, string entryName)
/// Initializes a new <see cref="UstarTarEntry"/> instance by converting the specified <paramref name="other"/> entry into the Ustar format.
/// </summary>
public UstarTarEntry(TarEntry other)
: base(other._header, other._readerOfOrigin!)
: this(other._header, other._readerOfOrigin!)
{
if (_header._typeFlag == TarEntryType.V7RegularFile)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public V7TarEntry(TarEntryType entryType, string entryName)
/// Initializes a new <see cref="V7TarEntry"/> instance by converting the specified <paramref name="other"/> entry into the V7 format.
/// </summary>
public V7TarEntry(TarEntry other)
: base(other._header, other._readerOfOrigin!)
: this(other._header, other._readerOfOrigin!)
{
if (_header._typeFlag == TarEntryType.RegularFile)
{
Expand Down