Commit Graph
1763 Commits
Author SHA1 Message Date
Timofey Solomko 7424bf718a Prepare for test release of 4.4.0 4.4.0-test 2018-08-05 23:34:22 +03:00
Timofey Solomko 16443fb3a2 Fix CI deploy problems (again) 2018-08-05 23:34:19 +03:00
Timofey Solomko 25d6b80ad8 [docs] Remove "never thrown" note from docs for TarError.wrongField 2018-08-05 13:06:11 +03:00
Timofey Solomko 02f7db0e39 [TAR] TarEntryInfo.size is now never nil (again)
This fixes potential force-unwrapping crashes in TarEntryInfoProvider and makes TarError.wrongField being in use again.
2018-08-05 13:05:35 +03:00
Timofey Solomko 384af1cedd [swcomp] create option of tar command now supports verbose option 2018-08-01 21:23:03 +03:00
Timofey Solomko fcbe6d76da [swcomp] Implement create option for tar command 2018-08-01 21:22:25 +03:00
Timofey Solomko 648d6e94b7 [Tests] Add tar create test for big numeric field (in this case, uid) 2018-07-31 21:08:04 +03:00
Timofey Solomko eb86e8f4b3 [Tests] Add tar create test for negative mtime 2018-07-31 21:07:30 +03:00
Timofey Solomko 1d0af24755 [TAR] Create pax headers if name or linkname cannot fit into tar header 2018-07-31 21:03:49 +03:00
Timofey Solomko bf96273ea8 [TAR] Apply base-256 encoding to negative values as well 2018-07-31 18:56:18 +03:00
Timofey Solomko feafb419f5 [Tests] Test creating ustar TAR containers without pax headers 2018-07-31 18:55:56 +03:00
Timofey Solomko 01f727627b [Tests] Migrate tar ext header tests to tar create tests 2018-07-31 14:15:59 +03:00
Timofey Solomko 0b8965d97f [Tests] Migrate tests for TarEntryInfo.generteContainerData() into TarContainer.create tests 2018-07-30 22:46:02 +03:00
Timofey Solomko 6477cc63e7 [TAR] Restore info.size being nil for directories 2018-07-30 22:46:02 +03:00
Timofey Solomko a7e7deeb80 [Tests] Add a simple test for TarContainer.create 2018-07-30 22:45:56 +03:00
Timofey Solomko 4b0a361aea [TAR] Add ext headers creation to TarContainer.create 2018-07-29 19:25:12 +03:00
Timofey Solomko d33ae76d85 [TAR] Add initializer to ext header which creates header with only necessary fields 2018-07-29 19:24:19 +03:00
Timofey Solomko b0be2ab38f [TAR] Sync TarEntry.data.count and TarEntry.info.size via property observer 2018-07-29 19:23:05 +03:00
Timofey Solomko 52b8a62f93 [TAR] Make TarEntry's info and data var-properties 2018-07-29 19:22:27 +03:00
Timofey Solomko 74b50be568 [TAR] Make TarEntry.init public and add argument labels 2018-07-29 19:21:25 +03:00
Timofey Solomko dddf29a811 [Tests] Add a couple of tests for tar entry infos with long names 2018-07-29 18:04:32 +03:00
Timofey Solomko 4dda3fe7f5 [Tests] Add a simple test for TarEntryInfo.generateContainerData 2018-07-29 18:04:32 +03:00
Timofey Solomko 9c7937504e [TAR] Add ustar implementation part of TarEntryInfo.generateContainerData 2018-07-29 18:04:25 +03:00
Timofey Solomko d3949524a1 [TAR] Add create function to TarContainer 2018-07-29 18:04:24 +03:00
Timofey Solomko 57a87dc1c8 [TAR] Implement TarEntry.generateContainerData() 2018-07-29 18:04:24 +03:00
Timofey Solomko 16e7fc7d44 [TAR] Add pre-POSIX implementation part of TarEntryInfo.generateContainerData() 2018-07-29 18:04:24 +03:00
Timofey Solomko 0281f11a86 [TAR] Add Data extension function which appends string field 2018-07-29 18:04:24 +03:00
Timofey Solomko 40ea63c456 [TAR] Add Data extension which appends numeric field value either in octal or base-256 format 2018-07-29 18:04:24 +03:00
Timofey Solomko 46bf2a6d94 [TAR] Add fileprivate extension to Data which works like String.padding and Data.prefix combined 2018-07-29 18:04:19 +03:00
Timofey Solomko 2e40dc903a [TAR] Add fileTypeIndicator property to TAR's ContainerEntryType extension 2018-07-29 18:04:19 +03:00
Timofey Solomko dcabef6e95 [TAR] Add basic public initializer to TarEntryInfo
It takes two the most necessary properties of EntryInfo as arguments: name and type.
2018-07-29 18:04:19 +03:00
Timofey Solomko 14a4df3182 [TAR] Make almost all properties of TarEntryInfo var (instead of let)
This also makes several nil-initializations redundant.
2018-07-29 18:04:11 +03:00
Timofey Solomko 24e7f38649 [Tests] Add several tests for TarExtendedHeader.generateContainerData() 2018-07-25 20:59:03 +03:00
Timofey Solomko 3725c14fe4 [TAR] Implement generateContainerData for extended header 2018-07-25 20:59:03 +03:00
Timofey Solomko 14b3fb2774 [TAR] Add enum for creation errors
First case: unable to encode a string with UTF-8 encoding
2018-07-25 20:59:03 +03:00
Timofey Solomko 53d0c951e5 [TAR] Make extended header's unknownRecords variable and add empty init() so extended header could be used in tests 2018-07-25 20:59:03 +03:00
Timofey Solomko f2e3a02518 [TAR] Skip leading zeros and whitespaces in numeric fields
This is used by some other (old) implementations.
2018-07-25 20:49:13 +03:00
Timofey Solomko d17e772abf [TAR] Support Sun's version of pax extended headers
Their version's only noticeable difference is in the typeflag (aka fileTypeIndicator) used ("X" instead of "x").
2018-07-24 22:52:34 +03:00
Timofey Solomko 1a583b5bc8 [TAR] Remove radix argument from ByteReader.tarInt function
Reason: it is always equals to 8.
2018-07-24 22:42:52 +03:00
Timofey Solomko e795924b5d [TAR] Correctly read device major/minor number as octal number 2018-07-24 22:42:05 +03:00
Timofey Solomko cc46e94c0f [Tests] Add test for tar container with file with negative mtime
In this case base-256 encoding is also used
2018-07-23 19:11:33 +03:00
Timofey Solomko 4fd7d1dc99 [Tests] Add test for tar container with file of very big size
"Very big" means big enough to use base-256 encoding.
2018-07-23 19:04:37 +03:00
Timofey Solomko 3a208ee047 [TAR] Handle base-256 encoding used for big or negative integer fields 2018-07-23 19:04:14 +03:00
Timofey Solomko dd7f439e26 Add self-xcode-workspace file from xcode project 2018-07-23 09:35:22 +03:00
Timofey Solomko 3dbda52480 [Tests] Add more tar format test asserts 2018-07-23 09:34:38 +03:00
Timofey Solomko a959703e2c [TAR] Remove hasRecognizedMagic property from TarEntryInfo 2018-07-23 09:34:17 +03:00
Timofey Solomko 12d70a4856 [TAR] Use new format property in formatOf function
As a result, gnu format is now returned correctly in some cases where previously ustar was a result.
2018-07-23 09:33:54 +03:00
Timofey Solomko 2d60b339fc [TAR] Add correctly set format property to TarEntryInfo 2018-07-23 09:27:39 +03:00
Timofey Solomko d8416dc711 [Tests] Add test case for gnu TAR format with incremental backup 2018-07-23 09:25:33 +03:00
Timofey Solomko ef162c4b4f [TAR] Correctly handle gnu format when used for incremental backups
Previously, in such cases the resulting entries were having incorrect file names instead of having ctime/atime.
2018-07-23 09:25:06 +03:00