Skip to content

Commit 1c115a7

Browse files
committed
Fix check for dest being subfolder of src
1 parent 9c7c704 commit 1c115a7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/e2e-bootstrap/bootstrap_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ func cleanEnvironment(t *testing.T, clientSet *framework.ClientSet) {
593593
// copyDir copies the contents of one directory to another,
594594
// both directories must exist, does not copy recursively
595595
func copyDir(src string, dest string) error {
596-
if dest[:len(src)] == src {
596+
if strings.HasPrefix(dest, src) {
597597
return fmt.Errorf("Cannot copy a folder into the folder itself!")
598598
}
599599

0 commit comments

Comments
 (0)