Menu

#6 Reading pclib.conf created on Windows

open-accepted
Shree
None
5
2009-03-16
2009-03-10
No

Hi Shree,
We've had a report where pclib.conf could not be read. Turns out the file was being created on a windows box(!) and then transferred to the linux_64 system (the cc and tcp port options were being tested for the user's firewall). I suspect this is going to be a very rare case (and a dos2unix on the file would fix the problem) but can the following be added to pcimpl.cpp at line 305 to catch any trailing DOS chars (getline() removes the \n).

if(str[0]=='#' || str[0]=='\r')
continue;
if ( str[strlen(str)-1]=='\r' )
str[strlen(str)-1]='\0';

Thanks in advance
George

Discussion

  • Shree

    Shree - 2009-03-16

    Hi George,

    Sorry for the late response.

    I've faced some dos2unix related problems myself in the past. Making this change will be good - one less thing to take care of. I'll put in this change in a couple of days & let you know. Hope that is acceptable.

    Thanks
    -- Shree

     
  • Shree

    Shree - 2009-03-16
    • assigned_to: nobody --> shreekumar
    • status: open --> open-accepted
     

Log in to post a comment.