Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Mon, 12 Jul 2004 13:32:28 +0200 From: Corinna Vinschen To: Cygwin List Subject: Re: Problem while copying .EXE files Message-ID: <20040712113228.GY1389@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: Cygwin List References: <6 DOT 1 DOT 0 DOT 6 DOT 0 DOT 20040711202348 DOT 03362be0 AT pop DOT prospeed DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i 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 > #include > > 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:cygwin AT cygwin DOT com 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/