• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSOpenPanel returns inadequate path for SMB volumes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOpenPanel returns inadequate path for SMB volumes?


  • Subject: NSOpenPanel returns inadequate path for SMB volumes?
  • From: MacLaser Software - Michael Collins <email@hidden>
  • Date: Fri, 31 Oct 2003 21:30:23 -0500

[Mac OS X 10.2.8] [nothing I can find in the archives, or online docs]

I use NSOpenPanel to get the path to a selected directory. Summary of methods invoked:

[NSOpenPanel openPanel]
[openPanel setCanChooseDirectories:true]
[openPanel setCanChooseFiles:false]
[openPanel setAllowsMultipleSelection:false]
[openPanel runModalForDirectory:nil file:nil types:nil]
[openPanel filenames]
[selection lastObject]

For local directories and for directories on volumes mounted using Personal File Sharing, the returned path in the CFString is as expected: "/<directory>..." or "/Volumes/<volumeName>/<directory>...". However, for SMB volumes, the path is "/Volumes/<IPaddress>/<directory>...", which is inadequate to allow access to the directory (e.g., as an argument to 'fopen' when a file name is appended). However, the volume in question does show up properly in the Finder with its mount point (volume) name.

Note that this also happens if you request a URL rather than a filename (i.e., "[openPanel URLs]"); the returned URL in the CFURL also contains "/Volumes/<IPaddress>".

Is this expected behaviour? If so, is it documented? And does Nav Services share this behaviour?

Michael
--
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Freelance programming
  • Next by Date: Re: XCodBuild Q not answered in docs or FAQ
  • Previous by thread: Re: Easy(?) Cocoa Question
  • Next by thread: Re: cocoa-dev digest, Vol 2 #3128 - 15 msgs
  • Index(es):
    • Date
    • Thread