On Jul 12 12:00, Mike Lerwill wrote: > I have tracked this further and can now confirm that running the following > test case (trimmed down from what cp is actually doing) in a directory which > already contains a valid test.exe (copy of ls.exe) results in test.exe which > is a directory not a file. > > #include <fcntl.h> > #include <unistd.h> > > int main (int argc, char * argv[]) > { > int test_file; > test_file = open ("test.exe",O_TRUNC | O_WRONLY); > close (test_file); > return 0; > } > > I have attached the results of stracing this in case it helps.
I'm sorry but I can't reproduce it. I'm getting a truncated but still normal file after calling this application. I also don't see anything strange in your strace output. Looks pretty much like my strace output, incuding all arguments to NtCreateFile. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Co-Project Leader mailto:[EMAIL PROTECTED] Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/