bug-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

InsertFile bug


From: David Schweikert
Subject: InsertFile bug
Date: Tue, 28 Aug 2001 15:15:24 +0200
User-agent: Mutt/1.2.4i

Hi,

I think that the following behaviour of cfengine 1.6.3 is a bug:

The 'InsertFile' editing action does always an empty line after the
file. This is a problem when "assembling" files that can't have empty
lines.

The following patch does fix that:

--- item-ext.c.orig     Tue Aug 28 14:15:15 2001
+++ item-ext.c  Tue Aug 28 14:16:56 2001
@@ -143,9 +143,8 @@
    return;
    }
 
-while(!feof(fp))
+while(!feof(fp) && ReadLine(linebuf,bufsize,fp))
    {
-   ReadLine(linebuf,bufsize,fp);
    
    if ((ip = (struct Item *)malloc(sizeof(struct Item))) == NULL)
       {


Cheers,
David
-- 
     _
  __| |___   David Schweikert <address@hidden>
 / _` / __|  IT Support Group, EE-Dept, ETH-Zurich
| (_| \__ \  Tel: +41(0)1-6327019  Room: ETL F24.1
 \__,_|___/  http://people.ee.ethz.ch/~dws/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]