Stream: shorthand
Topic: File creation not case-sensitive
Etienne Cantineau (May 06 2020 at 05:54):
Hello, i noticed there is an issue with case when sushi generates the files. I have an instance patient1, instead of creating/updating Patient-patient1.json in build folder, it was still updating the older mistaken name Patient-Patient1.json.
Chris Moesel (May 06 2020 at 13:28):
Hi @Etienne Cantineau -- this may not be in SUSHI's control. I'm assuming you're on Windows or Mac, which by default uses case insensitive file systems... If so, Patient-Patient1.json
and Patient-patient1.json
actually refer to the same file on disk, and copying one (from a different folder) to the other will change the contents of the file but will not change the name of the file. Here's a little test I did on my mac to demonstrate:
$ mkdir a
$ echo "I am a lowercase file" > a/test.txt
$ mkdir b
$ echo "I am an uppercase file" > b/TEST.txt
$ cat a/test.txt
I am a lowercase file
$ cp b/TEST.txt a/
$ ls a
test.txt
$ cat a/test.txt
I am an uppercase file
$
For the longest time I thought Mac used a case-sensitive file system... until I ran into an issue like this!
So... might that be what's going on? Or are you experiencing this on a truly case-sensitive file system?
Etienne Cantineau (May 06 2020 at 14:06):
Alright Chris! Yes i'm on Windows, it was a trivia issue in case Sushi wasn't doing well the creation. Good to know it's only that.
Chris Moesel (May 06 2020 at 14:08):
I think if you delete the file in build, then when it recreates it, it will have the right case.
Keith Boone (May 06 2020 at 15:12):
I can confirm this is an OS issue, not a Sushi issue, and that Chris's solution will work. I've had the same problem myself in other situations (e.g., trying to rename a file to use different case in Eclipse or from command line or via APIs on Windoze).
Etienne Cantineau (May 06 2020 at 16:11):
Indeed, that's what i finally did!
Grahame Grieve (May 06 2020 at 19:57):
note the ci-build happens on a case sensitive machine, so the publishers try to be as case sensitive as they can
Chris Moesel (May 06 2020 at 20:12):
Agreed, case sensitivity does matter. People on case insensitive file systems just need to be aware that wacky things can happen if you make name-changes that only change the casing; and you may need to manually intervene to make the file system do what you want!
Last updated: Apr 12 2022 at 19:14 UTC