Merge pull request #22946 from hashicorp/kmoe/copy_dir_dotfiles
remove dotfile exclusion in copyDir
This commit is contained in:
commit
cca36025d6
|
@ -4,7 +4,6 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// copyDir copies the src directory contents into dst. Both directories
|
// copyDir copies the src directory contents into dst. Both directories
|
||||||
|
@ -24,15 +23,6 @@ func copyDir(dst, src string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.HasPrefix(filepath.Base(path), ".") {
|
|
||||||
// Skip any dot files
|
|
||||||
if info.IsDir() {
|
|
||||||
return filepath.SkipDir
|
|
||||||
} else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// The "path" has the src prefixed to it. We need to join our
|
// The "path" has the src prefixed to it. We need to join our
|
||||||
// destination with the path without the src on it.
|
// destination with the path without the src on it.
|
||||||
dstPath := filepath.Join(dst, path[len(src):])
|
dstPath := filepath.Join(dst, path[len(src):])
|
||||||
|
|
Loading…
Reference in New Issue