DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 612Df9w63166385 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 612Df9w63166385 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=uzgj3yEF X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6AD7E4BB5912 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1770039668; bh=JDJAX5CvLx15/s4JzkX3Lulvl4HLk7ctMm+PZv8xbKs=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=uzgj3yEFlzazyOXQMm4uvVkxo9PKelbSUu4Mb3U2uhuZ1mbXIpvS0cxm9ZgqnrcN6 ugki2Nn1pf9B0jJh/LnjeyLBSQLFFRM7ewqXq/I36dmtqbvBCiML8gCReAOtal8GiX tE/DLGc+tRN3em6+Wc3e7u3YQoIizXpxyi2kR4Ro= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A0DB94BB58E6 Date: Mon, 2 Feb 2026 14:40:49 +0100 To: cygwin AT cygwin DOT com Subject: Re: git fsck complains about error: refs/tags/.cyg000000000559e25517156b51cf219f51/libgcj-2.95.0: badRefName: invalid refname format?! Message-ID: Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Corinna Vinschen via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Corinna Vinschen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Feb 2 13:24, Dan Shelton via Cygwin wrote: > I'm not sure whether the Cygwin code is correct. I did a peek with a > kernel debugger, and I see that FILE_RENAME_INFORMATION.RootDirectory > is always NULL if a file gets renamed to .cyg000000000xxxx. But if I > try that with NTFS or SMB, the NtSetInformationFile() to set > FileRenameInformation always fails. Your testcase is incorrect, unfortunately. > fri->FileNameLength = (wcslen(dstfile)+1)*sizeof(wchar_t); For NT file paths, never count the trailing \0 to the length: fri->FileNameLength = wcslen(dstfile) * sizeof (WCHAR); With that, your testcase works fine for me. On which filesystem did you see the problem? Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple