emscripten-core/emscripten

Files uploading into Virtual File System with -s CASE_INSENSITIVE_FS=1

Open

#15,245 opened on Oct 6, 2021

View on GitHub
 (19 comments) (0 reactions) (1 assignee)C++ (3,519 forks)batch import
good first bughelp wanted

Repository metrics

Stars
 (27,361 stars)
PR merge metrics
 (Avg merge 19d 10h) (147 merged PRs in 30d)

Description

Hi, I did some testing experiment with the flag "-s CASE_INSENSITIVE_FS=1" and notice that the virtual file system allows loading of different files of same name but different caps letters. i.e. ABC.txt, AbC.txt."

During opening of both files, regardless of "ABC.txt" or "AbC.txt", the open file would always be the last file of the same name that is loaded. In this case is AbC.txt. I understand this is due to all filenames are converted into lower case names during the lookup of files.

(*edited to make questions more explicit) I have a few questions with regards to the uploading of files behavior:

  1. Why is the case_insensitive flag not applied to uploading file function (function used: "FS_createdDataFile")
  2. Is the case sensitive behavior of uploading file function intended within the case_insensitive virtual file system?

Contributor guide