lowerCasing - Folders on Mac

Monkey Forums/Monkey Bug Reports/lowerCasing - Folders on Mac

Tibit(Posted 2012) [#1]
Noticed one gets errors on some platforms (like Mac) due to folders and files (non-monkey files) that are not in lowercase.

Should not monkey auto-rename all files to lower-case so such typos are avoided? Or how should we deal with things like that?


Soap(Posted 2012) [#2]
If the case sensitivity is Monkey's fault then yes it should be fixed.

If the case sensitivity is because how you name files and try to access files by different case then it's something you should deal with.


skavle(Posted 2012) [#3]
The problem basically is that for instance the IOS target is case sensitive when it comes to data files. And the XNA/GLFW target is not(on PC). So if the development team spends a lot of time on PC and the game runs fine on that platform you will run into problems when creating the xcode project, Problems that could easily be avoided if monkey renames the files to lowercase and internally uses lowercase for file access. You could argue that its not a problem "just use lowercase for everything" however on larger projects with lots of people involved the human factor still causes problems. You could also argue that this is a feature request rather than a bug. But from what i understand monkey aims to be a cross platform solution. This problem contradicts this.


xlsior(Posted 2012) [#4]
Except on Linux/Mac where filenames are case sensitive, 'file','FILE' and 'File' are all valid -different- files.

While it is of course not a smart idea to design a game in that manner, is it really the place of the language to enforce your filenaming sctructures?

Personally I'd be annoyed if it kept second-guessing my naming decisions, prohibiting me from creating libraries and modules that happen to have their name start with a capital letter... And even IF you enforced that naming scheme, it'd still be annoying when it comes to other items like images, sounds, and other data files that are dropped in after the fact... (Even more so when you're dealing with 3rd party user data: for example, you'd want your program to be able to handle all user files, even when the user in question has an image1.jpg and IMAGE1.JPG in the same folder, without blowing up...


skavle(Posted 2012) [#5]
I my opinion i still think that if the monkey/mojo application runs on one supported device/system it should run on all of them. This of course with target specific modules( .os and so on ) and performance set aside.


marksibly(Posted 2012) [#6]
Hi,

Monkey may or may not be able to help here, but IMO all data/file related stuff should always be rigorously tested on the target device anyway as there may be similar/related issues (app read/write privs? max allowed file size? dodgy file type format?) that Monkey also wont be able to catch.

If Monkey were to do anything here, the only thing I'd really be in favor of would be 'faking' case sensitive file names in Mojo (not the os module - I still want native filesystem access somewhere). I'll look into this eventually, but it's not high priority right now. Like I say, test thoroughly on all targets!