X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=carnet-tools-cn.git;a=blobdiff_plain;f=cp-update;fp=cp-update;h=5514ee650c07b37d685e878133999c6c0b30726a;hp=01bfe48e9a1619b12ce7787c94e162f38af282d3;hb=07f3e2984f79dfb911e3b0364dd10c7127fd705e;hpb=0391d17254435cc342c65e2277edb13c7c9cb093 diff --git a/cp-update b/cp-update index 01bfe48..5514ee6 100755 --- a/cp-update +++ b/cp-update @@ -459,7 +459,7 @@ sub actualize() { $file_new .= '.cp-update.new'; # our .new file $file_old .= '.cp-update.old'; # our .old file # write content in new file in single write op - sysopen ($FileHandle, $file_new, O_CREAT|O_TRUNC|O_WRONLY) + sysopen ($FileHandle, $file_new, O_CREAT|O_TRUNC|O_WRONLY, (stat($File))[2]) or die "$ProgramName: Failed to open file '$File' for writing ($!)\n"; if (length($newContent)) { my $wb = syswrite($FileHandle, $newContent);