diff --git a/src/command/expire/expire.c b/src/command/expire/expire.c index 73c8bea652..96f9ca9f06 100644 --- a/src/command/expire/expire.c +++ b/src/command/expire/expire.c @@ -98,11 +98,9 @@ expireBackup(InfoBackup *infoBackup, String *removeBackupLabel, String *backupEx ASSERT(removeBackupLabel != NULL); ASSERT(backupExpired != NULL); + storageRemoveNP(storageRepoWrite(), strNewFmt(STORAGE_REPO_BACKUP "/%s/" MANIFEST_FILE, strPtr(removeBackupLabel))); storageRemoveNP( - storageRepoWrite(), strNewFmt(STORAGE_REPO_BACKUP "/%s/" INFO_MANIFEST_FILE, strPtr(removeBackupLabel))); - - storageRemoveNP( - storageRepoWrite(), strNewFmt(STORAGE_REPO_BACKUP "/%s/" INFO_MANIFEST_FILE INFO_COPY_EXT, strPtr(removeBackupLabel))); + storageRepoWrite(), strNewFmt(STORAGE_REPO_BACKUP "/%s/" MANIFEST_FILE INFO_COPY_EXT, strPtr(removeBackupLabel))); // Remove the backup from the info file infoBackupDataDelete(infoBackup, removeBackupLabel); diff --git a/src/command/stanza/delete.c b/src/command/stanza/delete.c index 8c5cd3b822..7361b60418 100644 --- a/src/command/stanza/delete.c +++ b/src/command/stanza/delete.c @@ -38,11 +38,10 @@ manifestDelete(const Storage *storageRepoWriteStanza) for (unsigned int idx = 0; idx < strLstSize(backupList); idx++) { storageRemoveNP( - storageRepoWriteStanza, - strNewFmt(STORAGE_REPO_BACKUP "/%s/" INFO_MANIFEST_FILE, strPtr(strLstGet(backupList, idx)))); + storageRepoWriteStanza, strNewFmt(STORAGE_REPO_BACKUP "/%s/" MANIFEST_FILE, strPtr(strLstGet(backupList, idx)))); storageRemoveNP( storageRepoWriteStanza, - strNewFmt(STORAGE_REPO_BACKUP "/%s/" INFO_MANIFEST_FILE INFO_COPY_EXT, strPtr(strLstGet(backupList, idx)))); + strNewFmt(STORAGE_REPO_BACKUP "/%s/" MANIFEST_FILE INFO_COPY_EXT, strPtr(strLstGet(backupList, idx)))); } FUNCTION_TEST_RETURN_VOID(); diff --git a/src/info/manifest.h b/src/info/manifest.h index 4203fe6d5c..1becc10493 100644 --- a/src/info/manifest.h +++ b/src/info/manifest.h @@ -7,6 +7,6 @@ Manifest Handler /*********************************************************************************************************************************** Constants ***********************************************************************************************************************************/ -#define INFO_MANIFEST_FILE "backup.manifest" +#define MANIFEST_FILE "backup.manifest" #endif diff --git a/test/src/module/command/expireTest.c b/test/src/module/command/expireTest.c index 382d1300dd..2a0ae7e8a8 100644 --- a/test/src/module/command/expireTest.c +++ b/test/src/module/command/expireTest.c @@ -168,11 +168,14 @@ testRun(void) harnessCfgLoad(strLstSize(argList), strLstPtr(argList)); TEST_RESULT_VOID( - storagePutNP(storageNewWriteNP(storageTest, strNewFmt("%s/%s", strPtr(full1Path), INFO_MANIFEST_FILE)), - BUFSTRDEF(BOGUS_STR)), "full1 put manifest"); + storagePutNP( + storageNewWriteNP(storageTest, strNewFmt("%s/%s", strPtr(full1Path), MANIFEST_FILE)), BUFSTRDEF(BOGUS_STR)), + "full1 put manifest"); TEST_RESULT_VOID( - storagePutNP(storageNewWriteNP(storageTest, strNewFmt("%s/%s", strPtr(full1Path), INFO_MANIFEST_FILE ".copy")), - BUFSTRDEF(BOGUS_STR)), "full1 put manifest copy"); + storagePutNP( + storageNewWriteNP( + storageTest, strNewFmt("%s/%s", strPtr(full1Path), MANIFEST_FILE ".copy")), BUFSTRDEF(BOGUS_STR)), + "full1 put manifest copy"); TEST_RESULT_VOID( storagePutNP(storageNewWriteNP(storageTest, strNewFmt("%s/%s", strPtr(full1Path), "bogus")), BUFSTRDEF(BOGUS_STR)), "full1 put extra file");