style(DeepSource): Added two ignores

This commit is contained in:
netbenix 2022-02-19 17:38:16 +01:00
parent cd700be26c
commit 06b8631ca3
2 changed files with 5 additions and 7 deletions

View file

@ -78,6 +78,7 @@ func getTimeSuffix() string {
return "_" + currTime.Format("02-01-2006_15-04")
}
// skipcq: RVV-A0005
func checkTmpPath(createLocalBackup bool, targetPath string) string {
logger := Logging.DetailedLogger("mainThread", "checkTmpPath")
if !createLocalBackup {

View file

@ -19,17 +19,14 @@ func CreateBakFile(fileName string, folderPath string, destinationPath string, b
pathToFile := destinationPath + string(os.PathSeparator) + fileName + ".bak"
fileToWrite, err := os.OpenFile(pathToFile, os.O_CREATE|os.O_RDWR, os.FileMode(0775))
if err != nil {
logger.Fatal(err)
}
compress(fileToWrite, folderPath, backupName)
SQL.NewLogEntry(SQL.GetSQLInstance(), uuid.New(), SQL.LogInfo, backupName, SQL.SQLStage_Compress, SQL.REMOTE_NONE, "File successfully written.", time.Now())
return pathToFile
}
@ -41,6 +38,7 @@ func compress(fileToWrite *os.File, folderPath string, backupName string){
go fmt.Printf("[%s] Start compression...\n", backupName)
SQL.NewLogEntry(SQL.GetSQLInstance(), uuid.New(), SQL.LogInfo, backupName, SQL.SQLStage_Compress, SQL.REMOTE_NONE, "Start compression", time.Now())
// skippcq: SCC-SA4009
filepath.Walk(folderPath, func(file string, fi os.FileInfo, err error) error {
header, err := tar.FileInfoHeader(fi, file)
if err != nil {
@ -77,7 +75,6 @@ func compress(fileToWrite *os.File, folderPath string, backupName string){
logger.Fatal(err)
}
go fmt.Printf("[%s] Compression Done.\n", backupName)
SQL.NewLogEntry(SQL.GetSQLInstance(), uuid.New(), SQL.LogInfo, backupName, SQL.SQLStage_Compress, SQL.REMOTE_NONE, "Compression complete.", time.Now())
}