Open RhetTbull opened 6 months ago
This appears to work on macOS:
def is_smbfs_path(path):
path_device = os.stat(path).st_dev
mounts = os.popen("mount").readlines()
for mount in mounts:
if "(smbfs" in mount:
mnt_device = os.stat(mount.split(" ")[2]).st_dev
if mnt_device == path_device:
return True
return False
Using osxphotos over a Synology NAS (and likely other SMB volumes) can be horribly slow due to SQLite performance over these very slow network volumes. Detect if volume is SMB and if so, use
--ramdb
automatically. Add a--no-ramdb
that prevents this if required.See #1415 and #1418
See this discussion for a way of detecting if volume is SMB.