Skip to content

Commit 30b459e

Browse files
author
Marcin Przepiorowski
committed
Merge branch 'posix_issue_153' into develop
2 parents 9f989df + 2262ee2 commit 30b459e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bin/dx_ctl_snapshots.pl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,17 @@
8686
exit (1);
8787
}
8888

89+
my $w = ($retention =~ /^[[:digit:]]+$/);
90+
print Dumper !$w;
91+
92+
93+
8994
if (defined($retention)) {
9095
if (lc $retention eq 'forever') {
9196
$retention = -1;
9297
} elsif (lc $retention eq 'policy') {
9398
$retention = 0;
94-
} elsif (! isdigit($retention) ) {
99+
} elsif (! ($retention =~ /^[[:digit:]]+$/x )) {
95100
print "Retention parameter has to be a integer or word 'forever' \n";
96101
pod2usage(-verbose => 1, -input=>\*DATA);
97102
exit(1);

0 commit comments

Comments
 (0)