When I run one of my apps on Catalina, it asks permission for the program to access network drives. I don’t need access to network drives, so in a perfect world, this message would not come up.
I understand that this message may go away once I’ve properly signed and notarized my app (still working on that), but for curiosity sake, is there a way to avoid looking at Network drives when trying to find a particular volume?
My program performs a firmware update on an external device which shows up as an external USB drive, but it first has to find that device by checking each volume to see if the appropriate file is contained therein. I suppose it’s scan is also looking at network drives, and this may be why Catalina is complaining.
Is the following code causing the warning in Catalina? Can anyone suggest a “better” way to scan that would only look at external USB volumes?
Oh - it’s cross-platform so this has to work on Windows too. (It does currently)
For CurVolNum as Integer = 0 to VolumeCount -1
Try
f = Volume(CurVolNum)
If f.Count = 1 And f.item(1).Name = "firmware.bin" Then
Exit For
Else
f = Nil
End If
Catch ex As IOException
f = Nil
End Try
Next CurVolNum
pretty sure you could, on macOS, determine whether its a network drive or not by examining the output of the mount command and parsing it apart looking for the Volumes full path in that output
mount tells you if the drive is local or not along with several other useful bits