mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
@@ -75,7 +75,11 @@ func Tar(directory string, limit int64) ([]byte, error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if strings.HasPrefix(filepath.Base(rel), ".") {
|
||||
if strings.HasPrefix(rel, ".") {
|
||||
if fileInfo.IsDir() && rel != "." {
|
||||
// Don't archive hidden files!
|
||||
return filepath.SkipDir
|
||||
}
|
||||
// Don't archive hidden files!
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user