pspp-dev
[Top][All Lists]
Advanced

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

Re: Re: save translate error


From: Harry Thijssen
Subject: Re: Re: save translate error
Date: Sun, 18 Jan 2015 13:22:49 +0100

I guess the error handling should be improved before it makes sense to try to find the issue.

One of the things which came to my mind is that the file is busy by another proces. But the directory is suspicious too. In MSwindows it is shown with other names in other languages :-(

This might be a good case to use the debug version introduced in my latest MSWindows build. 
I could build a special verison with addtional printf's to trace the problem and ask the user to used that version for his test.

Have fun 


Date: Wed, 14 Jan 2015 10:17:43 +0100
From: John Darrington <address@hidden>
To: Alberto Cabello S??nchez <address@hidden>
Cc: address@hidden
Subject: Re: save translate error


[ Moving to address@hidden ]

On Wed, Jan 14, 2015 at 08:47:47AM +0100, Alberto Cabello S??nchez wrote:

     Also, it seems "almost OK": it raises an error but then displays "success",
     but still an error (as the file is not created). Double-checking the Windows
     behaviour regarding this code

       /* Create the file on disk. */
       w->rf = replace_file_start (fh_get_file_name (fh), "w", 0666,
                                   &w->file, NULL);
       if (w->rf == NULL)
         {
           msg (ME, _("Error opening `%s' for writing as a system file: %s."),
                fh_get_file_name (fh), strerror (errno));
           goto error;
         }

One thing which looks suspicious to me:

errno is used *way* after it would have been set by the failed system call.
This would explain the apparent "Success".  The interesting value of errno
has likely been overwritten by subsequent calls.

J'


reply via email to

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