This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem creating files on network drives with cygwin 1.5.10-3 and tar

On Wed, Jun 16, 2004 at 06:10:03PM -0700, Rick Rankin wrote:
> --- "Pierre A. Humblet" <> wrote:
> > 
> > Due to the way the debug_printf are located in fhandler_base::open (PTC),
> > more information is displayed in case of success than in case of failure.
> > So it would be interesting to rerun strace after touching the file.
> > Doing a strace .... | fgrep NtCreateFile 
> > should already give most of the useful info.
> > 
> > Also, is 0x601 the only combination that fails?
> > 
> It seems to be the O_TRUNC flag that's causing the problem. If I remove it, the
> open succeeds when the file doesn't exist.
> Here's the output of 'strace opentest /cygdrive/m/foo | fgrep NtCreateFile'
> when /cygdrive/m/foo exists and with the O_TRUNC flag (1 line):
>  1081  154650 [main] opentest 1796 fhandler_base::open: 0 = NtCreateFile
> (0x32C, 40100080, m:\foo, io, NULL, 80, 7, 0, 20, NULL, 0)
The most likely explanation is that one of your network drives does not fully
support the FILE_SUPERSEDE creation flag. Perhaps one could use FILE_OVERWRITE_IF
instead. The difference is slight and according to 
this is how CREATE_ALWAYS is implemented. CREATE_ALWAYS was used up to 
1.5.9 on NT systems.


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]