public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* patch command incorrectly capitalizes filenames that live on external USB flash drives
@ 2020-04-28 19:27 Jason Gross
  2020-04-29  4:52 ` Thomas Wolff
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Jason Gross @ 2020-04-28 19:27 UTC (permalink / raw)
  To: 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:
```
powershell -Command "(New-Object
Net.WebClient).DownloadFile('http://www.cygwin.com/setup-x86_64.exe',
'setup-x86_64.exe')"
SET CYGMIRROR=http://mirror.easyname.at/cygwin
SET CYGROOT=H:\cygwin64
SET CYGCACHE=%CYGROOT%\var\cache\setup
setup-x86_64.exe -qnNdO -R %CYGROOT% -l %CYGCACHE% -s %CYGMIRROR% -P
rsync -P patch -P diffutils -P make -P unzip -P m4 -P findutils -P
time -P wget -P curl -P git -P
mingw64-x86_64-binutils,mingw64-x86_64-gcc-core,mingw64-x86_64-gcc-g++,mingw64-x86_64-pkg-config,mingw64-x86_64-windows_default_manifest
-P mingw64-x86_64-headers,mingw64-x86_64-runtime,mingw64-x86_64-pthreads,mingw64-x86_64-zlib
-P python3
```

Running `patch -v` says `GNU patch 2.7.4`.  Note that this happens
regardless of whether I install cygwin itself on my external flash
drive or on my internal HD.

This came up when trying to run `opam install findlib` (which fails
when the home directory is on an external USB drive).

-Jason

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-05-14 16:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 19:27 patch command incorrectly capitalizes filenames that live on external USB flash drives Jason Gross
2020-04-29  4:52 ` Thomas Wolff
2020-04-29  4:52 ` Marco Atzeri
2020-04-29 23:48   ` Brian Inglis
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

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).