Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions pkg/devspace/sync/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,19 +189,27 @@ func recursiveTar(basePath, relativePath string, writtenFiles map[string]*fileIn
return nil
}

config.fileIndex.fileMapMutex.Lock()
isExcluded := false

// Exclude files on the exclude list
if config.ignoreMatcher != nil {
if config.ignoreMatcher.MatchesPath(relativePath) {
return nil
isExcluded = true
}
}

// Exclude files on the upload exclude list
if config.uploadIgnoreMatcher != nil {
if config.uploadIgnoreMatcher.MatchesPath(relativePath) {
return nil
isExcluded = true
}
}
config.fileIndex.fileMapMutex.Unlock()

if isExcluded {
return nil
}

stat, err := os.Lstat(filepath)

Expand Down