This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -43,7 +42,7 @@ func (i infiniteFS) DirNames(name string) ([]string, error) {
|
||||
for j := 0; j < i.width; j++ {
|
||||
names = append(names, fmt.Sprintf("aa-file-%d", j))
|
||||
}
|
||||
if len(strings.Split(name, string(os.PathSeparator))) < i.depth {
|
||||
if len(fs.PathComponents(name)) < i.depth {
|
||||
for j := 0; j < i.width; j++ {
|
||||
names = append(names, fmt.Sprintf("zz-dir-%d", j))
|
||||
}
|
||||
|
||||
+1
-1
@@ -311,7 +311,7 @@ func (w *walker) walkAndHashFiles(ctx context.Context, toHashChan chan<- protoco
|
||||
// ignored path need to be handled as well.
|
||||
// Prepend an empty string to handle ignoredParent without anything
|
||||
// appended in the first iteration.
|
||||
for _, name := range append([]string{""}, strings.Split(rel, string(fs.PathSeparator))...) {
|
||||
for _, name := range append([]string{""}, fs.PathComponents(rel)...) {
|
||||
ignoredParent = filepath.Join(ignoredParent, name)
|
||||
info, err = w.Filesystem.Lstat(ignoredParent)
|
||||
// An error here would be weird as we've already gotten to this point, but act on it nonetheless
|
||||
|
||||
Reference in New Issue
Block a user