mirror of
https://github.com/restic/restic.git
synced 2025-03-16 00:00:05 +01:00
changed integration test
This commit is contained in:
parent
0dd8a0fe01
commit
ce90a281fd
2 changed files with 15 additions and 5 deletions
|
@ -35,16 +35,21 @@ func walkDir(dir string) <-chan *dirEntry {
|
|||
return nil
|
||||
}
|
||||
|
||||
stat, ok := restic.ToStatT(info.Sys())
|
||||
links := 1
|
||||
if runtime.GOOS != "windows" {
|
||||
stat, ok := restic.ToStatT(info.Sys())
|
||||
|
||||
if !ok {
|
||||
return nil
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
links = stat.nlink()
|
||||
}
|
||||
|
||||
|
||||
ch <- &dirEntry{
|
||||
path: name,
|
||||
fi: info,
|
||||
link: stat.nlink(),
|
||||
link: links,
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -36,6 +36,11 @@ func (e *dirEntry) equals(other *dirEntry) bool {
|
|||
fmt.Fprintf(os.Stderr, "%v: GID does not match (%v != %v)\n", e.path, stat.Gid, stat2.Gid)
|
||||
return false
|
||||
}
|
||||
|
||||
if stat.nlink() != stat2.nlink() {
|
||||
fmt.Fprintf(os.Stderr, "%v: Number of links doe not match (%v != %v)\n", e.path, stat.nlink(), stat2.nlink())
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue