Only mirror regular files
This commit is contained in:
@@ -17,21 +17,15 @@ func ifFatal(err *probe.Error) {
|
||||
}
|
||||
}
|
||||
|
||||
func ifError(err error) {
|
||||
switch e := err.(type) {
|
||||
case *probe.Error:
|
||||
switch e {
|
||||
case nil:
|
||||
// nothing to print
|
||||
default:
|
||||
if !globalDebugFlag {
|
||||
console.Errorln(e.ToError())
|
||||
}
|
||||
console.Errorln(err)
|
||||
}
|
||||
func ifError(err *probe.Error) {
|
||||
switch err {
|
||||
case nil:
|
||||
// nothing to print
|
||||
default:
|
||||
if !globalDebugFlag {
|
||||
console.Errorln(err.ToError())
|
||||
return
|
||||
}
|
||||
console.Errorln(err)
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -128,7 +128,9 @@ func deltaSourceTargets(sourceClnt client.Client, targetClnts []client.Client) <
|
||||
mirrorURLsCh <- mirrorURLs{Error: sourceContentCh.Err.Trace()}
|
||||
return
|
||||
}
|
||||
sourceTrie.Insert(patricia.Prefix(sourceContentCh.Content.Name), sourceContentCh.Content.Size)
|
||||
if sourceContentCh.Content.Type.IsRegular() {
|
||||
sourceTrie.Insert(patricia.Prefix(sourceContentCh.Content.Name), sourceContentCh.Content.Size)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -142,7 +144,9 @@ func deltaSourceTargets(sourceClnt client.Client, targetClnts []client.Client) <
|
||||
mirrorURLsCh <- mirrorURLs{Error: targetContentCh.Err.Trace()}
|
||||
return
|
||||
}
|
||||
targetTrie.Insert(patricia.Prefix(targetContentCh.Content.Name), struct{}{})
|
||||
if targetContentCh.Content.Type.IsRegular() {
|
||||
targetTrie.Insert(patricia.Prefix(targetContentCh.Content.Name), struct{}{})
|
||||
}
|
||||
}
|
||||
targetTries[i] = targetTrie
|
||||
}(i, targetClnt)
|
||||
|
||||
Reference in New Issue
Block a user