Skip to content

Commit 3ed3147

Browse files
committed
Simplify code
1 parent d5298ef commit 3ed3147

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

pkg/devspace/sync/evaluater.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,13 @@ func shouldUpload(relativePath string, stat os.FileInfo, s *SyncConfig, isInitia
5252
if s.uploadIgnoreMatcher.MatchesPath(relativePath) {
5353
// Add to file map and prevent download if local file is newer than the remote one
5454
if s.fileIndex.fileMap[relativePath] != nil && s.fileIndex.fileMap[relativePath].Mtime < ceilMtime(stat.ModTime()) {
55-
fileInformation := &fileInformation{
55+
// Add it to the fileMap
56+
s.fileIndex.fileMap[relativePath] = &fileInformation{
5657
Name: relativePath,
5758
Mtime: ceilMtime(stat.ModTime()),
5859
Size: stat.Size(),
5960
IsDirectory: stat.IsDir(),
6061
}
61-
62-
// Add it to the fileMap
63-
s.fileIndex.fileMap[relativePath] = fileInformation
6462
}
6563

6664
return false

0 commit comments

Comments
 (0)