X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=carnet-tools-cn.git;a=blobdiff_plain;f=cp-update;h=5514ee650c07b37d685e878133999c6c0b30726a;hp=01bfe48e9a1619b12ce7787c94e162f38af282d3;hb=refs%2Fheads%2Flenny;hpb=64e2d2cffac17873e3dc3e342edf87344d5552b3 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);