mirror of
https://github.com/restic/restic.git
synced 2025-08-23 14:57:37 +00:00
convert uid/gid -1 to 0 only in 32-bit tar dump
Only for a 32-bit build of restic, convert a uid or gid value of -1 to 0.
This commit is contained in:
@@ -38,9 +38,10 @@ const (
|
||||
cISVTX = 0o1000 // Save text (sticky bit)
|
||||
)
|
||||
|
||||
// substitute a uid or gid of -1 (which was converted to 2^32 - 1) with zero
|
||||
// in a 32-bit build of restic:
|
||||
// substitute a uid or gid of -1 (which was converted to 2^32 - 1) with 0
|
||||
func tarIdentifier(id uint32) int {
|
||||
if int32(id) == -1 {
|
||||
if int(id) == -1 {
|
||||
return 0
|
||||
}
|
||||
return int(id)
|
||||
|
Reference in New Issue
Block a user