Skip to content

Commit d2ad98c

Browse files
committed
Fix initial sync upload dir problem
1 parent 5a36483 commit d2ad98c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

pkg/devspace/sync/sync_config.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ func (s *SyncConfig) diffServerClient(filepath string, sendChanges *[]*fileInfor
301301
}
302302

303303
if stat.IsDir() {
304-
return s.diffDir(filepath, sendChanges, downloadChanges)
304+
return s.diffDir(filepath, stat, sendChanges, downloadChanges)
305305
}
306306

307307
// Add file to upload
@@ -315,7 +315,7 @@ func (s *SyncConfig) diffServerClient(filepath string, sendChanges *[]*fileInfor
315315
return nil
316316
}
317317

318-
func (s *SyncConfig) diffDir(filepath string, sendChanges *[]*fileInformation, downloadChanges map[string]*fileInformation) error {
318+
func (s *SyncConfig) diffDir(filepath string, stat os.FileInfo, sendChanges *[]*fileInformation, downloadChanges map[string]*fileInformation) error {
319319
relativePath := getRelativeFromFullPath(filepath, s.WatchPath)
320320
files, err := ioutil.ReadDir(filepath)
321321

@@ -327,6 +327,8 @@ func (s *SyncConfig) diffDir(filepath string, sendChanges *[]*fileInformation, d
327327
if len(files) == 0 {
328328
*sendChanges = append(*sendChanges, &fileInformation{
329329
Name: relativePath,
330+
Mtime: ceilMtime(stat.ModTime()),
331+
Size: stat.Size(),
330332
IsDirectory: true,
331333
})
332334
}

0 commit comments

Comments
 (0)