Morgan
Morgan

Reputation: 1897

Mac OSX mounted network drive name changes

I'm working on a cocoa app that copies files to a user defined folder, and I'm currently testing it with a network drive. When I get the location of the network drive from the standard cocoa file browser, it looks like "/Volumes/Media". This works fine usually. There seems to be an issue though that I can't quite seem to work out where when I disconnect from my WIFI network, the Media drive remains mounted (I see it in /Volumes) but it is not accessible. Then when I reconnect the network, the drive is mounted to /Volumes/Media-1. I still see the original unusable /Volumes/Media drive until I restart my computer.

My question is a two parter. First, does anyone have any ideas why my drive may be staying "mounted" in my /Volumes folder even though I'm disconnected from the network. And secondly, I noticed that iTunes doesn't seem to be phased by this change of Volume name (from Media to Media-1). It is able to notice that the content it was originally accessing on /Volumes/Media, is now on /Volumes/Media-1 and continues functioning without a hitch. How might I go about detecting that name change and updating the path that I have stored in my app?

I'm trying this on OSX Lion by the way.

Upvotes: 2

Views: 4216

Answers (1)

CharlesB
CharlesB

Reputation: 90316

I asked the same question on Ask Different :

How to prevent the “-1” suffix in network drive paths?

Upvotes: 2

Related Questions