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.
How to unmount the default source directory or .love file
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- 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
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.
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
True 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.

Re: How to unmount the default source directory or .love file
Hey Zorg, good to see you again!
I am not using a mount point. I would like to overwrite the default source directory with another .love file.
I will try your suggestion although I am not 100% sure if it is what I need.
Who is online
Users browsing this forum: Amazon [Bot], Google [Bot] and 3 guests