all: Move remaining protos to use the vanity plugin (#7009)

This commit is contained in:
Audrius Butkevicius
2020-10-02 08:07:05 +02:00
committed by GitHub
parent 7774932302
commit e027175446
55 changed files with 8353 additions and 1396 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ func Blocks(ctx context.Context, r io.Reader, blocksize int, sizehint int64, cou
thisHash, hashes = hashes[:hashLength], hashes[hashLength:]
b := protocol.BlockInfo{
Size: int32(n),
Size: int(n),
Offset: offset,
Hash: thisHash,
WeakHash: weakHf.Sum32(),
+2 -2
View File
@@ -350,7 +350,7 @@ func (w *walker) walkRegular(ctx context.Context, relPath string, info fs.FileIn
f, _ := CreateFileInfo(info, relPath, nil)
f = w.updateFileInfo(f, curFile)
f.NoPermissions = w.IgnorePerms
f.RawBlockSize = int32(blockSize)
f.RawBlockSize = blockSize
if hasCurFile {
if curFile.IsEquivalentOptional(f, w.ModTimeWindow, w.IgnorePerms, true, w.LocalFlags) {
@@ -611,7 +611,7 @@ func CreateFileInfo(fi fs.FileInfo, name string, filesystem fs.Filesystem) (prot
}
f.Permissions = uint32(fi.Mode() & fs.ModePerm)
f.ModifiedS = fi.ModTime().Unix()
f.ModifiedNs = int32(fi.ModTime().Nanosecond())
f.ModifiedNs = fi.ModTime().Nanosecond()
if fi.IsDir() {
f.Type = protocol.FileInfoTypeDirectory
return f, nil