Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8775a39

Browse files
committed
fix retention show message, when no policy is set
1 parent 23abfcb commit 8775a39

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

show.c

+6
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ do_show(time_t backup_id)
6868
int
6969
do_retention_show(void)
7070
{
71+
if (retention_redundancy == 0 && retention_window == 0)
72+
{
73+
fprintf(stdout, "No retention policy is set\n");
74+
return 0;
75+
}
76+
7177
fprintf(stdout, "# retention policy\n");
7278
if (retention_redundancy > 0)
7379
fprintf(stdout, "REDUNDANCY=%u\n", retention_redundancy);

0 commit comments

Comments
 (0)