2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-26 20:30:19 +00:00

Remove unneeded code

This commit is contained in:
Alexander Neumann 2018-04-19 22:07:28 +02:00
parent fd12a3af20
commit 76b616451f

View File

@ -517,45 +517,6 @@ func (node Node) sameExtendedAttributes(other Node) bool {
return true
}
// IsNewer returns true of the file has been updated since the last Stat().
func (node *Node) IsNewer(path string, fi os.FileInfo) bool {
if node.Type != "file" {
debug.Log("node %v is newer: not file", path)
return true
}
tpe := nodeTypeFromFileInfo(fi)
if node.Name != fi.Name() || node.Type != tpe {
debug.Log("node %v is newer: name or type changed", path)
return true
}
size := uint64(fi.Size())
extendedStat, ok := toStatT(fi.Sys())
if !ok {
if !node.ModTime.Equal(fi.ModTime()) ||
node.Size != size {
debug.Log("node %v is newer: timestamp or size changed", path)
return true
}
return false
}
inode := extendedStat.ino()
if !node.ModTime.Equal(fi.ModTime()) ||
!node.ChangeTime.Equal(changeTime(extendedStat)) ||
node.Inode != uint64(inode) ||
node.Size != size {
debug.Log("node %v is newer: timestamp, size or inode changed", path)
return true
}
debug.Log("node %v is not newer", path)
return false
}
func (node *Node) fillUser(stat statT) error {
node.UID = stat.uid()
node.GID = stat.gid()