Fix to avoid changing permissions on existing files
Package and upload artifacts / build (push) Failing after 0s
Tests / prove (push) Has been cancelled
Package and upload artifacts / build (push) Failing after 0s
Tests / prove (push) Has been cancelled
This commit is contained in:
+6
-3
@@ -178,12 +178,15 @@ else {
|
|||||||
|
|
||||||
# Validate destination section
|
# Validate destination section
|
||||||
if ($in{'mode'} == 0) {
|
if ($in{'mode'} == 0) {
|
||||||
|
my $newfile = !-e($in{'file'});
|
||||||
open(FILE, ">>$in{'file'}") ||
|
open(FILE, ">>$in{'file'}") ||
|
||||||
&error(&text('save_efile', $in{'file'}, $!));
|
&error(&text('save_efile', $in{'file'}, $!));
|
||||||
close(FILE);
|
close(FILE);
|
||||||
my $user = $config{'log_user'} || 'root';
|
if ($newfile) {
|
||||||
my $group = $config{'log_group'};
|
my $user = $config{'log_user'} || 'root';
|
||||||
&set_ownership_permissions($user, $group, 644, $in{'file'});
|
my $group = $config{'log_group'};
|
||||||
|
&set_ownership_permissions($user, $group, 0644, $in{'file'});
|
||||||
|
}
|
||||||
$log->{'file'} = $in{'file'};
|
$log->{'file'} = $in{'file'};
|
||||||
$log->{'sync'} = $in{'sync'};
|
$log->{'sync'} = $in{'sync'};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user