otiai10 / copy

Go copy directory recursively

Home Page:https://pkg.go.dev/github.com/otiai10/copy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot copy to kernel dir

sh4m2hwz opened this issue · comments

fmt.Println(src,dst)
	opt := copy.Options{
		Skip: func(src string) (bool, error) {
			return strings.HasSuffix(src, ".ext"), nil
		},
	}
	if err := copy.Copy(
		src,
		dst,
		opt,
		);err != nil {
		fmt.Println("[-] Cannot copy files to kernel dir:",err)
		return err
	}

output:

/path/to/src/ /lib/modules/4.11.0-generic/build/drivers/tc/ [-] Cannot copy files to kernel dir: stat /lib/modules/4.11.0-generic/build/drivers/tc/: invalid argument
go env