Hello,
Hopefully this is just a n00b mistake someone will be able to clear up no sweat. When running my game with 'love .' in the root directory works just fine. However, when I create the .love file and try to run that I'm finding that the line 'love.filesystem.isDirectory(path)' is now returning false instead of true, causing one of my assert statements to fail.
I'm 99.9% sure I'm creating the .love correctly. It loads love, and I get the skyblue window with the traceback to my assert in white. If I unzip the .love into another directory, I can enter it and run 'love .' and have everything work again.
I am trying to run the .love in windows, and I'm running 'love .' in linux, so maybe that's related. I tried flipping the path separators around to no avail (/ to \), but I didn't think that was the issue anyway since my understanding is that love code is supposed to be cross platform.
Thanks for any light you can shed.
filesyststem isDirectory works in source, but not in .love
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Prole
- Posts: 4
- Joined: Sun Dec 08, 2013 7:26 am
- slime
- Solid Snayke
- Posts: 3162
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: filesyststem isDirectory works in source, but not in .lo
Does the path string in your isDirectory call match the case of the real path inside the .love (e.g. "Myfolder" vs "myfolder")?
Re: filesyststem isDirectory works in source, but not in .lo
We could probably shed more light if you provided the .love file in question so we can test it out ourselves and look at the code.
Re: filesyststem isDirectory works in source, but not in .lo
It probably does, since he runs the folder in Linuxslime wrote:Does the path string in your isDirectory call match the case of the real path inside the .love (e.g. "Myfolder" vs "myfolder")?
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
-
- Prole
- Posts: 4
- Joined: Sun Dec 08, 2013 7:26 am
Re: filesyststem isDirectory works in source, but not in .lo
That was it. Part of the string was "testMap", but the real path was "testmap". I'm uncertain why this worked on linux (which is case sensitive, hence the two paths shouldn't match) but not in windows (which is case insensitive, and the two paths should have).slime wrote:Does the path string in your isDirectory call match the case of the real path inside the .love (e.g. "Myfolder" vs "myfolder")?
-
- Prole
- Posts: 4
- Joined: Sun Dec 08, 2013 7:26 am
Re: filesyststem isDirectory works in source, but not in .lo
Oh, you know what? It's because I'm running linux in a VM, and mounting folders from the host OS (windows) and drive (NTFS). So the underlying file system is case sensitive, but the OS doesn't think it is... maybe? I got some strange behaviour when I tried to rename it to the same thing with a different case. Regardless, not a love problem at all - thanks for the help though!
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: filesyststem isDirectory works in source, but not in .lo
Oh yeah, mounts like that should do that. About case-sensitivity on windows, there is none, but zip files are case-sensitive (and therefore love files).
-
- Prole
- Posts: 4
- Joined: Sun Dec 08, 2013 7:26 am
Re: filesyststem isDirectory works in source, but not in .lo
Oh, I didn't know that about zip files. That explains some of the oddness I was seeing. Thanks!
Who is online
Users browsing this forum: Ahrefs [Bot] and 6 guests