mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 23:00:58 +00:00
ea87bcefd6
This adds a new nanoseconds field to the FileInfo, populates it during scans and sets the non-truncated time in Chtimes calls. The actual file modification time is defined as modified_s seconds + modified_ns nanoseconds. It's expected that the modified_ns field is <= 1e9 (that is, all whole seconds should go in the modified_s field) but not really enforced. Given that it's an int32 the timestamp can be adjusted += ~2.9 seconds by the modified_ns field... GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3431
37 lines
1.2 KiB
Protocol Buffer
37 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package db;
|
|
|
|
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
|
|
import "github.com/syncthing/syncthing/lib/protocol/bep.proto";
|
|
|
|
option (gogoproto.goproto_getters_all) = false;
|
|
option (gogoproto.sizer_all) = false;
|
|
option (gogoproto.protosizer_all) = true;
|
|
|
|
message FileVersion {
|
|
protocol.Vector version = 1 [(gogoproto.nullable) = false];
|
|
bytes device = 2;
|
|
}
|
|
|
|
message VersionList {
|
|
option (gogoproto.goproto_stringer) = false;
|
|
repeated FileVersion versions = 1 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
// Must be the same as FileInfo but without the blocks field
|
|
message FileInfoTruncated {
|
|
option (gogoproto.goproto_stringer) = false;
|
|
string name = 1;
|
|
protocol.FileInfoType type = 2;
|
|
int64 size = 3;
|
|
uint32 permissions = 4;
|
|
int64 modified_s = 5;
|
|
int32 modified_ns = 11;
|
|
bool deleted = 6;
|
|
bool invalid = 7;
|
|
bool no_permissions = 8;
|
|
protocol.Vector version = 9 [(gogoproto.nullable) = false];
|
|
int64 sequence = 10;
|
|
}
|