X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 1 Mar 2010 15:26:58 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Directory named "." created at /: seems to have happened during update Message-ID: <20100301142658.GZ5683@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4B8BA03F DOT 9090402 AT bonhard DOT uklinux DOT net> <20100301113255 DOT GU5683 AT calimero DOT vinschen DOT de> <20100301120520 DOT GV5683 AT calimero DOT vinschen DOT de> <20100301121148 DOT GW5683 AT calimero DOT vinschen DOT de> <20100301130528 DOT GY5683 AT calimero DOT vinschen DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100301130528.GY5683@calimero.vinschen.de> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Mar 1 14:05, Corinna Vinschen wrote: > On Mar 1 13:11, Corinna Vinschen wrote: > > On Mar 1 13:05, Corinna Vinschen wrote: > > > On Mar 1 12:32, Corinna Vinschen wrote: > > > > On Mar 1 11:08, Fergus wrote: > > > > > My Cygwin [1.7] is located at the root of a mobile hard drive and a > > > > > simple DOS dir command now shows a directory named . as in > > > > > [...] > > > > > > > > Oh boy. I didn't even know that NT allows that. > > > > > > > > That's two bugs in one. The lilypond package has paths with leading > > > > "./" in it, and setup.exe does not recognize that and remove the dot > > > > path. > > > > > > > > For now I have removed the latest lilypond package from the distro. > > > > Jan, can you please fix your package not to have leading ./ in the path? > > > > > > > > As for setup.exe, I have to have a look how to avoid that. > > > > > > The problem is, I can't reproduce it. I created two test packages, > > > one with a file "./file" in it, the other with a file "tmp/./file". > > > In both cases, setup.exe failed to create the file and showed a > > > message "unable to extract ...". > > > > > > This was on Windows 7. What Windows are you using? Maybe an older > > > version allows it. Unless I can create the "." directory myself, > > > I can't fix it. > > > > On Windows XP I can't reproduce it either. Hmm. > > Are you sure the directory name is really "."? Could you please have > a look if the directory isn't called ". " with one or more trailing > spaces? Creating such directories is no problem and removing isn't > a problem either: > > $ rmdir ". " And, just for completeness, I tested to create a file and a directory with the name ".", using the native NT function NtCreateFile(*), as setup and Cygwin do. Both tests resulted in the status code 0xC0000033, STATUS_OBJECT_NAME_INVALID. So I'm pretty sure the name of the directory is not ".". Alternatively, you have some software running which installs a filesystem filter driver, and that filter driver overrides or skips these sanity checks in the OS. Corinna (*) ==== SNIP ==== #include #include #include #include #include #define FNAME L"\\??\\C:\\cygwin\\tmp\\dot\\." int main (int argc, char **argv) { UNICODE_STRING fname; OBJECT_ATTRIBUTES attr; NTSTATUS stat; HANDLE fh; IO_STATUS_BLOCK io; printf ("Full NT path: %ls\n", FNAME); RtlInitUnicodeString (&fname, FNAME); InitializeObjectAttributes (&attr, &fname, OBJ_CASE_INSENSITIVE, NULL, NULL); stat = NtCreateFile (&fh, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, NULL, 0, FILE_SHARE_VALID_FLAGS, FILE_CREATE, #if 0 FILE_DIRECTORY_FILE | #else FILE_NON_DIRECTORY_FILE | #endif FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0); if (!NT_SUCCESS (stat)) { printf ("Unable to create %ls, status = 0x%08X\n", FNAME, stat); return 1; } NtClose(fh); NtDeleteFile (&attr); return 0; } ==== SNAP ==== -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple