Skip to content

Commit 61cb452

Browse files
Fix rclone filters when output is . (#484)
* Fix `rclone` filters when `output` is `.` * Restyled by gofmt Co-authored-by: Restyled.io <commits@restyled.io>
1 parent d004148 commit 61cb452

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

task/common/machine/storage.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,13 @@ func Status(ctx context.Context, remote string, initialStatus common.Status) (co
9898
}
9999

100100
func Transfer(ctx context.Context, source, destination string, include string) error {
101-
include = filepath.Clean(include)
102-
if filepath.IsAbs(include) || strings.HasPrefix(include, "../") {
101+
if include = filepath.Clean(include); filepath.IsAbs(include) || strings.HasPrefix(include, "../") {
103102
return errors.New("storage.output must be inside storage.workdir")
104103
}
105104

106105
rules := []string{
107-
"+ /" + include,
108-
"+ /" + include + "/**",
106+
"+ " + filepath.Clean("/"+include),
107+
"+ " + filepath.Clean("/"+include+"/**"),
109108
"- **",
110109
}
111110

0 commit comments

Comments
 (0)