title: Cocoa contentsOfDirectoryAtPath: method failing with error for certain users - Mac OS X
body: <p>Here's a snippet of the code:</p>
  
  <pre><code>// Get into the data folder of it
  keychainPath = [keychainPath stringByAppendingPathComponent:@"data/default"];
  
  DLog(@"Keychain data path: %@", keychainPath);
  
  // Define Filemanager
  NSFileManager *fm = [NSFileManager defaultManager];
  
  // Catch any errors
  NSError *dataError = nil;
  
  // get all the files in the directory
  NSArray *dataFiles = [fm contentsOfDirectoryAtPath:keychainPath error:&amp;dataError];
  
  if(!dataFiles)
   NSLog(@"Error: %@",dataError);
  </code></pre>
  
  <p>Now this works perfectly fine for most people, but a few have reported problems, with the 'dataError' object giving:</p>
  
  <pre><code>  Error: Error
  Domain=NSCocoaErrorDomain Code=260 UserInfo=0x14d1fa10 "The folder
  “default” doesn’t exist." Underlying Error=(Error
  Domain=NSOSStatusErrorDomain Code=-43 "The operation couldn’t be
  completed. (OSStatus error -43.)" (File not found))
  </code></pre>
  
  <p>The people having this problem have said that the file / folder 'default' DOES exist exactly where is should be, so I have no idea why this isn't working.</p>
  
  <p>Any help would be appreciated!</p>