Skip to content

Commit f0658e3

Browse files
committed
Fikser sendToBothSystems flagg
1 parent 33771db commit f0658e3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

mailrouter/mail_router.pl

+6-4
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,10 @@
104104

105105
if ($messageMatched eq 1) {
106106
if ($dryRunMode eq 0) {
107-
if ($sendToBothSystems eq 0) {
108-
$oldCounter++;
107+
if ($sendToBothSystems eq 1) {
108+
print "sendToBothSystems active, sending copy to old system\n";
109109
copy("$inputDirectory/$filename", "$oldEmottakDirectory/$filename");
110+
$oldCounter++;
110111
}
111112
move("$inputDirectory/$filename", "$newEmottakDirectory/$filename");
112113
}
@@ -115,9 +116,10 @@
115116
}
116117
else {
117118
if ($dryRunMode eq 0) {
118-
if ($sendToBothSystems eq 0) {
119-
$newCounter++;
119+
if ($sendToBothSystems eq 1) {
120+
print "sendToBothSystems active, sending copy to new system\n";
120121
copy("$inputDirectory/$filename", "$newEmottakDirectory/$filename");
122+
$newCounter++;
121123
}
122124
move("$inputDirectory/$filename", "$oldEmottakDirectory/$filename");
123125
}

0 commit comments

Comments
 (0)