public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: patch command incorrectly capitalizes filenames that live on external USB flash drives
Date: Wed, 29 Apr 2020 17:48:25 -0600	[thread overview]
Message-ID: <240e41c4-5ada-b84c-7bd4-4130a2debc4b@SystematicSw.ab.ca> (raw)
In-Reply-To: <e99231bc-59d5-29fa-f3f0-232fdfab26f3@gmail.com>

On 2020-04-28 22:52, Marco Atzeri via Cygwin wrote:
> Am 28.04.2020 um 21:27 schrieb Jason Gross via Cygwin:
>> Consider the following script in foo.sh:
>> ```
>> #!/usr/bin/env bash
>>
>> set -ex
>>
>> cd "$1"
>> rm -rf foo
>> mkdir foo
>> cd foo
>> cat > Makefile <<EOF
>> a
>> b
>> c
>> d
>> e
>> EOF
>> cat > diff <<EOF
>> diff --git a/Makefile b/Makefile
>> index 9405325..86d2f8c 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1,5 +1,5 @@
>>   a
>>   b
>> -c
>> +ccc
>>   d
>>   e
>> EOF
>> patch -p1 -i ./diff
>> ls
>> ```
>>
>> If I run `./foo.sh /cygdrive/c/`, I get, as expected,
>> ```
>> + cd /cygdrive/c/
>> + rm -rf foo
>> + mkdir foo
>> + cd foo
>> + cat
>> + cat
>> + patch -p1 -i ./diff
>> patching file Makefile
>> + ls
>> diff  Makefile
>> ```
>>
>> If I instead run `./foo.sh /cygdrive/h/`, I get
>> ```
>> + cd /cygdrive/h/
>> + rm -rf foo
>> + mkdir foo
>> + cd foo
>> + cat
>> + cat
>> + patch -p1 -i ./diff
>> patching file Makefile
>> + ls
>> diff  MAKEFILE
>> ```
>>
>> My C drive is an internal SSD (NTFS), my H drive is an external flash
>> drive (FAT32).  I installed cygwin with the commands:
> 
> use a flash driver with NTFS and check the difference
> 
> I doubt it is a patch issue

That might be expected with FAT32, which is normally the default format for
flash drives, for maximum compatibility with microcontrollers, which may not
create VFAT Long File Names when file names are <= 8.3, so they appear as upper
case.

	$ cmd /c help format shows Windows format now supports:

	/FS:filesystem	Specifies the type of the file system (FAT, FAT32,
			exFAT, NTFS, UDF, ReFS).

You might want to try an ExFAT formatted flash drive to see if it works as
expected, and is compatible with your other systems.

Following MS opening up exFAT specs, exFAT is supported on most major OSes but
may require packages normally called exfat-utils and exfat-fuse or fuse-exfat to
be installed: exFAT was designed for flash drives.

[P.S. UDF is the new ISO DVD standard and Re(silient)FS was intended to replace
NTFS for Windows Server, but is deprecated, and creation is being dropped from
Windows 10 Home, so that option value may not work.]

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

  reply	other threads:[~2020-04-29 23:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 19:27 Jason Gross
2020-04-29  4:52 ` Thomas Wolff
2020-04-29  4:52 ` Marco Atzeri
2020-04-29 23:48   ` Brian Inglis [this message]
2020-05-14  0:31 ` Jason Gross
2020-05-14  2:32   ` Jason Gross
2020-05-14  5:07     ` Jason Gross
2020-05-14 15:15       ` Brian Inglis
2020-05-14 16:30       ` ASSI
2020-05-14 13:57   ` Ken Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=240e41c4-5ada-b84c-7bd4-4130a2debc4b@SystematicSw.ab.ca \
    --to=brian.inglis@systematicsw.ab.ca \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).