rojo icon indicating copy to clipboard operation
rojo copied to clipboard

Naming a luau file "Init" instead of "init" causes the special case to duplicate scripts

Open chronaxis opened this issue 1 year ago • 1 comments

image image

As you can see, the Init script should not be there in Roblox Studio. Note that I renamed the folder via the project file, but I confirmed the problem source when renaming "Init" to "init", which stopped the issue from occuring.

chronaxis avatar Apr 25 '24 04:04 chronaxis

Confirmed. Seems to work for all files that compile to a script

Fixing this most likely involves defining how irregularly named init files should be treated. A few approaches off the top of my head:

  • Always treat files named "init" as init files, regardless of case
  • Only treat files named "init" (in all lowercase) as init files and treat all other files as regular ones
  • Force all init files to be lowercase or refuse to compile

Bonus: If you use irregular casing in its file extension (e.g. Init.luaU), the duped script seems to dissapear

lrockreal avatar May 31 '24 23:05 lrockreal