Skip to content

Commit

Permalink
fix: replace fatalln with println
Browse files Browse the repository at this point in the history
We don't want to crash, if a single file can't be added. Depending on the file, this might be expected.
  • Loading branch information
d-Rickyy-b committed Jan 28, 2021
1 parent 74d5b8f commit 721f6b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func writeTar(archiveFile *os.File, filesToBackup []BackupFileMetadata, unit Uni
pathInArchive := getPathInArchive(filePath, fileMetadata.backupBasePath, unit)

if err := addFileToTar(tw, filePath, pathInArchive); err != nil {
log.Fatalln(err)
log.Println(err)
}
bar.Increment()
}
Expand All @@ -283,7 +283,7 @@ func writeZip(archiveFile *os.File, filesToBackup []BackupFileMetadata, unit Uni
pathInArchive := getPathInArchive(filePath, fileMetadata.backupBasePath, unit)

if err := addFileToZip(zw, filePath, pathInArchive); err != nil {
log.Fatalln(err)
log.Println(err)
}
bar.Increment()
}
Expand Down

0 comments on commit 721f6b2

Please sign in to comment.