I have been working on a 7-zip frontend to compress files and folders to .7z files. It works by dropping files/folders onto the window and then processing the drops.
I don’t want the (idiot) user (maybe me! ) to accidentally drop a whole bloody disc drive to be compressed. On a PC this is fine as I check the path of the file ( eg: C:\ ) and if too short I say “No no no!”. I also check if the parent is nil.
Now I am transferring this program over to my emulated Mac, and want to do the same check. Given that one might have other drives mounted, and that this is sometimes Unix with mount points and slashes in paths and sometimes Mac-like with colon separators in paths, also .dmg files mounted, I am looking for advice on how to proceed. Must I cycle through volumes and check paths, or what would be safe and fairly easy?
Thanks.