Bugfix VentoyWorker.sh - mount detection false-positive
Need to match whole word, or e.g. /dev/loop12 would match, when trying to install to /dev/loop1
For /dev/sda, if /dev/sda1 is mounted, we should check it.
I see your intention now. There will be a lot of edge-cases to consider in order to do this properly then - For example, besides loop-devices, nvme has completely different naming conventions (
How about using lsblk -no MOUNTPOINTS "$DISK" | xargs instead? It should give us a list of all the actual active mountpoints on the particular block device, which could also be directly forwarded to the user for information (i.e. <DISK> is mounted on: <mountpoints>).