mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 02:18:44 -07:00
Fix linux/freebsd/windows compilation
This commit is contained in:
parent
d7cc48eab2
commit
4f6ee7c8eb
@ -12,22 +12,22 @@ type nativeModel struct {
|
||||
next Model
|
||||
}
|
||||
|
||||
func (m nativeModel) Index(nodeID string, repo string, files []FileInfo) {
|
||||
func (m nativeModel) Index(nodeID NodeID, repo string, files []FileInfo) {
|
||||
m.next.Index(nodeID, repo, files)
|
||||
}
|
||||
|
||||
func (m nativeModel) IndexUpdate(nodeID string, repo string, files []FileInfo) {
|
||||
func (m nativeModel) IndexUpdate(nodeID NodeID, repo string, files []FileInfo) {
|
||||
m.next.IndexUpdate(nodeID, repo, files)
|
||||
}
|
||||
|
||||
func (m nativeModel) Request(nodeID, repo string, name string, offset int64, size int) ([]byte, error) {
|
||||
func (m nativeModel) Request(nodeID NodeID, repo string, name string, offset int64, size int) ([]byte, error) {
|
||||
return m.next.Request(nodeID, repo, name, offset, size)
|
||||
}
|
||||
|
||||
func (m nativeModel) ClusterConfig(nodeID string, config ClusterConfigMessage) {
|
||||
func (m nativeModel) ClusterConfig(nodeID NodeID, config ClusterConfigMessage) {
|
||||
m.next.ClusterConfig(nodeID, config)
|
||||
}
|
||||
|
||||
func (m nativeModel) Close(nodeID string, err error) {
|
||||
func (m nativeModel) Close(nodeID NodeID, err error) {
|
||||
m.next.Close(nodeID, err)
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ type nativeModel struct {
|
||||
next Model
|
||||
}
|
||||
|
||||
func (m nativeModel) Index(nodeID string, repo string, files []FileInfo) {
|
||||
func (m nativeModel) Index(nodeID NodeID, repo string, files []FileInfo) {
|
||||
for i, f := range files {
|
||||
if strings.ContainsAny(f.Name, disallowedCharacters) {
|
||||
files[i].Flags |= FlagInvalid
|
||||
@ -37,7 +37,7 @@ func (m nativeModel) Index(nodeID string, repo string, files []FileInfo) {
|
||||
m.next.Index(nodeID, repo, files)
|
||||
}
|
||||
|
||||
func (m nativeModel) IndexUpdate(nodeID string, repo string, files []FileInfo) {
|
||||
func (m nativeModel) IndexUpdate(nodeID NodeID, repo string, files []FileInfo) {
|
||||
for i, f := range files {
|
||||
if strings.ContainsAny(f.Name, disallowedCharacters) {
|
||||
files[i].Flags |= FlagInvalid
|
||||
@ -48,15 +48,15 @@ func (m nativeModel) IndexUpdate(nodeID string, repo string, files []FileInfo) {
|
||||
m.next.IndexUpdate(nodeID, repo, files)
|
||||
}
|
||||
|
||||
func (m nativeModel) Request(nodeID, repo string, name string, offset int64, size int) ([]byte, error) {
|
||||
func (m nativeModel) Request(nodeID NodeID, repo string, name string, offset int64, size int) ([]byte, error) {
|
||||
name = filepath.FromSlash(name)
|
||||
return m.next.Request(nodeID, repo, name, offset, size)
|
||||
}
|
||||
|
||||
func (m nativeModel) ClusterConfig(nodeID string, config ClusterConfigMessage) {
|
||||
func (m nativeModel) ClusterConfig(nodeID NodeID, config ClusterConfigMessage) {
|
||||
m.next.ClusterConfig(nodeID, config)
|
||||
}
|
||||
|
||||
func (m nativeModel) Close(nodeID string, err error) {
|
||||
func (m nativeModel) Close(nodeID NodeID, err error) {
|
||||
m.next.Close(nodeID, err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user