• 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
Re: NSFileManager, 10.3.x and /tmp: bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSFileManager, 10.3.x and /tmp: bug?


  • Subject: Re: NSFileManager, 10.3.x and /tmp: bug?
  • From: The Karl Adam <email@hidden>
  • Date: Sun, 16 Jan 2005 10:19:07 -0500

Perhaps because your supposed to be using NSTemporaryDirectory(), it's
in the AppKit Functions IIRC.

-Karl


On Sun, 16 Jan 2005 14:50:05 +0100, Stéphane Sudre <email@hidden> wrote:
> Let's say I am running Mac OS X 10.3.x.
> Let's say I just booted it and I'm logged under user-id 501 and
> /tmp/501 does not exist.
> Let's say I'm calling the following code from a Cocoa application built
> with ProjectBuilder.
>
> NSString * tTempPath;
> BOOL isDirectory;
> NSFileManager * tFileManager;
>
> tTempPath=[NSString stringWithFormat:@"/tmp/%d",getuid()];
>
> tFileManager=[NSFileManager defaultManager];
>
> if ([tFileManager fileExistsAtPath:tTempPath
> isDirectory:&isDirectory]==NO)
> {
>         if ([tFileManager createDirectoryAtPath:tTempPath attributes:nil]==NO)
>       {
>                 NSBeep();
>
>           return NO;
>       }
> }
>
> Is there any rational reason why the first time this call is called,
> the code goes to NSBeep() and when it's called again, the code works?
>
> I tried this code on Mac OS X 10.2 and didn't see any such absurd
> phenomenon.
> I tried resolving /tmp instead of creating the file directly, the bug
> still occurs.
> I looked at /tmp (/private/tmp if you prefer), the permissions are
> allowing anyone to create a folder (drwxrwxrwt).
>
> Any idea?
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSFileManager, 10.3.x and /tmp: bug?
      • From: Stéphane Sudre <email@hidden>
References: 
 >NSFileManager, 10.3.x and /tmp: bug? (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Copy Files build phase
  • Next by Date: Re: NSFileManager, 10.3.x and /tmp: bug?
  • Previous by thread: NSFileManager, 10.3.x and /tmp: bug?
  • Next by thread: Re: NSFileManager, 10.3.x and /tmp: bug?
  • Index(es):
    • Date
    • Thread