mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-09-06 00:57:19 -04:00
[lint] Remove deprecated tar.TypeRegA (#300)
Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
This commit is contained in:
+2
-2
@@ -377,7 +377,7 @@ func WriteTarFileFromBackupStream(t *tar.Writer, r io.Reader, name string, size
|
|||||||
// WriteTarFileFromBackupStream.
|
// WriteTarFileFromBackupStream.
|
||||||
func FileInfoFromHeader(hdr *tar.Header) (name string, size int64, fileInfo *winio.FileBasicInfo, err error) {
|
func FileInfoFromHeader(hdr *tar.Header) (name string, size int64, fileInfo *winio.FileBasicInfo, err error) {
|
||||||
name = hdr.Name
|
name = hdr.Name
|
||||||
if hdr.Typeflag == tar.TypeReg || hdr.Typeflag == tar.TypeRegA {
|
if hdr.Typeflag == tar.TypeReg {
|
||||||
size = hdr.Size
|
size = hdr.Size
|
||||||
}
|
}
|
||||||
fileInfo = &winio.FileBasicInfo{
|
fileInfo = &winio.FileBasicInfo{
|
||||||
@@ -468,7 +468,7 @@ func WriteBackupStreamFromTarFile(w io.Writer, t *tar.Reader, hdr *tar.Header) (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if hdr.Typeflag == tar.TypeReg || hdr.Typeflag == tar.TypeRegA {
|
if hdr.Typeflag == tar.TypeReg {
|
||||||
bhdr := winio.BackupHeader{
|
bhdr := winio.BackupHeader{
|
||||||
Id: winio.BackupData,
|
Id: winio.BackupData,
|
||||||
Size: hdr.Size,
|
Size: hdr.Size,
|
||||||
|
|||||||
Reference in New Issue
Block a user