0

following scenario:

In my webapp, my customers are using Firefox as target browser. They have the need to open afp:// folders via Javascript. To make a long story short, this really works. You need to setup Firefox with about:config and set the value network.protocol-handler.external.afp to true.

What happens then, the operating system (OSX) takes care of that path and it correctly opens a Finder window.

The problem:

OSX does create a new mount every time. It cannot distinct between afp://host/path/111 and afp://host/path/222 for instance.
Furthermore, even if the afp path is 100% identical a new mount is created. It looks like this is the default behavior from OSX regardless of Firefox.

So, is there any chance I can tell OSX not to create a new mount for some sub directorys which should get access over afp:// ?


update:

It looks like, there are OSX applications which can change the default behavior for network protocols. So you can change "somewhere" which application OSX should call for a protocol. If that is true, wouldn't it be possible to create a script which just opens the local path without a afp:// prefix ?

The question here is, where is that configuration (?) to tell OSX which application to use for specific protocol. Any help welcome!

3 Answers 3

1

Ahh I had a totally different response worked out and then figured out the reason why this is a problem.

The reason this is a problem is because, once an AFP share is mounted, it is essentially a local "Volume". Thus, listing it as a mounted Volume locally on said machine. So, using another "AFP://" link of any sort would open a NEW AFP connection to the server itself.

1
  • Yes, but what is the solution.
    – jAndy
    Mar 11, 2011 at 17:32
0

You can use RCDefaultApp to set the application to use for a given URL scheme (afp in your case). Note that the application should probably declare its ability to handle the afp scheme in its Info.plist file, under the key CFBundleURLTypes.

0

I agree with what @Hacha said; you´re indeed creating a new mountpoint with every afp:// call and make it a /Volume/mountpoint. Instead of calling afp everytime, I´d suggest opening the top folder once via afp://server/mountpoint and then use a file url file:///Volumes/mountpoint instead.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .