nadrino / SimpleModManager

SimpleModManager is an homebrew app for the Nintendo Switch
GNU General Public License v3.0
326 stars 12 forks source link

Feature Request: Symlinks over copy & pasting files #27

Closed LokeYourC3PH closed 1 year ago

LokeYourC3PH commented 2 years ago

So, I have wondered why SMM just doesn't create symlinks over copying, pasting and deleting files. As far as I can tell, it would create far less issues (as in possibly having left over files left behind after deactivating/deleting mods, as the symlinks would stop working rather than the files being left behind in places like "contents" and "romfs"), make activation instantaneous (because it only creates symbolic links to the files, rather than copying tens to possibly hundreds of megabytes or even gigabytes for really large mods or modpacks), and it would also make mod merging/multi mod usage easier as it would just replace symlinks in the order that the mods have been activated in, rather than replacing files of individual mods and potentially breaking the load order or even worse breaking mods themselves.

So why isn't this a feature or the way SMM works? It would be great if SMM worked this way instead, and I think it would make SMM safer, faster and more reliable.

KP2048 commented 2 years ago

Fat32 does not support symlinks

KP2048 commented 2 years ago

Neither does exfat

LokeYourC3PH commented 2 years ago

Hmm yeah you're right, kinda forgot about that because I forgot how garbage FAT32 is in comparison to modern filesystems 😂 I assume there's no equivalent or better solution to this other than keeping it the way it is?

KP2048 commented 2 years ago

Unless Nintendo decides to support btrfs, or someone in homebrew figures out how to make a driver for it, I don’t see how this could be done. (Windows can natively read btrfs and so can Linux and it supports both hard links and symbolic links as well as true file system compression and has way better read/write speeds)

KP2048 commented 2 years ago

I agree fat32 is hot garbage but Nintendo decided to use it because most operating systems can read it

KP2048 commented 2 years ago

The only way to do links in fat32 is to manually alter the entry in the file system. Unfortunately most file system checkers like fsck will see that as corruption and “fix” it by undoing the modification.