How to unmount the default source directory or .love file

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
ivan
Party member
Posts: 1939
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

How to unmount the default source directory or .love file

Post by ivan »

Is it possible to unmount the default source directory or .love file?
I am facing an issue where lfs.getDirectoryItems returns items from both the default source directory and a newly mounted archive.
User avatar
zorg
Party member
Posts: 3477
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: How to unmount the default source directory or .love file

Post by zorg »

What mountpoint did you mount the newly mounted archive into? If you didn't supply one, it put the files into the root of the virtual file system, which is probably not the best of ideas.

Give the method a second parameter e.g. "mounts/"..tostring(id)" or whatever, and then you can freely iterate over that.

Alternatively, i believe you can also test what a file/folder's real path is, and if it's not what you want, you can ignore that during iteration. (example on the wiki)

Note that i'm making an assumption that this is not about "updating" your project from an archive, because if it is, mounting the files into the root and setting the third parameter to prepend instead of append the new files will work better.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
ivan
Party member
Posts: 1939
Joined: Fri Mar 07, 2008 1:39 pm
Contact:

Re: How to unmount the default source directory or .love file

Post by ivan »

Hey Zorg, good to see you again!
zorg wrote: Thu Feb 27, 2025 10:08 am What mountpoint did you mount the newly mounted archive into? If you didn't supply one, it put the files into the root of the virtual file system, which is probably not the best of ideas.
I am not using a mount point. I would like to overwrite the default source directory with another .love file.
zorg wrote: Thu Feb 27, 2025 10:08 ammounting the files into the root and setting the third parameter to prepend instead of append the new files will work better.
I will try your suggestion although I am not 100% sure if it is what I need.
Post Reply

Who is online

Users browsing this forum: Amazon [Bot], Google [Bot] and 4 guests