Skip to content

Commit 94e01d0

Browse files
committed
chore: lint
1 parent 8ba62fa commit 94e01d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/file/file_manager_service.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ func (fms *FileManagerService) checkAllowedDirectory(checkFiles []*mpi.File) err
459459

460460
// DetermineFileActions compares two sets of files to determine the file action for each file. Returns a map of files
461461
// that have changed and a map of the contents for each updated and deleted file. Key to both maps is file path
462-
// nolint: revive
462+
// nolint: revive,cyclop
463463
func (fms *FileManagerService) DetermineFileActions(currentFiles, modifiedFiles map[string]*mpi.File) (
464464
map[string]*mpi.File, map[string][]byte, error,
465465
) {
@@ -476,7 +476,7 @@ func (fms *FileManagerService) DetermineFileActions(currentFiles, modifiedFiles
476476

477477
manifestFiles, manifestFileErr := fms.getManifestFile(currentFiles)
478478

479-
if manifestFileErr != nil {
479+
if manifestFileErr != nil && manifestFiles == nil {
480480
return nil, nil, manifestFileErr
481481
}
482482
// if file is in manifestFiles but not in modified files, file has been deleted
@@ -573,7 +573,7 @@ func (fms *FileManagerService) UpdateManifestFile(currentFiles map[string]*mpi.F
573573

574574
func (fms *FileManagerService) getManifestFile(currentFiles map[string]*mpi.File) (map[string]*mpi.File, error) {
575575
if _, err := os.Stat(manifestFilePath); err != nil {
576-
return currentFiles, nil // Return current files if manifest directory still doesn't exist
576+
return currentFiles, err // Return current files if manifest directory still doesn't exist
577577
}
578578

579579
file, err := os.ReadFile(manifestFilePath)

0 commit comments

Comments
 (0)