bugGNUstep - Bugs: bug #28484, unable to set /tmp as current...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #28484: unable to set /tmp as current directory on Windows through NSFileManager

Submitted by:  Doug Simons <theeggcamefirst>
Submitted on:  Tue 05 Jan 2010 01:15:16 AM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Declined

Tue 05 Jan 2010 09:51:00 PM UTC, comment #2:

Very good. Thanks for the response. I think using NSTemporaryDirectory() will be workable (and is no doubt the "correct" thing to do) although it is a bit different in that it returns a user-specific temporary directory rather than the system-wide "/tmp".

Doug Simons <theeggcamefirst>
Tue 05 Jan 2010 04:21:42 PM UTC, comment #1:

Definitely not a bug ... the '/tmp' directory does not exist on windows, so you should not be trying to change to it, and if you do try to change to it you should get a failure response (in general ... of course it can happen that you might have created a /tmp on the current disk ... in which case changing to it will succeed).

Obviously there's no point trying to change to a non-existent directory, so I imagine that's not really what you want. My guess is that you want to be using the NSTemporaryDirectory() function for this...

[[NSFileManager defaultManager] changeCurrentDirectoryPath: NSTemporaryDirectory()]

The mingw shell has its own unix style paths system, which it maps onto windows paths. You should not try using mingw patch within gnustep ... gnustep apps use native windows paths.

Richard Frith-Macdonald <CaS>
Project Member
Tue 05 Jan 2010 01:15:16 AM UTC, original submission:

On Windows, [[NSFileManager defaultManager] changeCurrentDirectoryPath:@"/tmp"] returns 0 and fails to change the current directory.

In a MINGW terminal window I can cd to /tmp just fine (although I have no idea where this folder actually lives in the Windows file system). I need to be able to do this in my code as well...

This is on Windows XP.

Doug Simons <theeggcamefirst>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by theeggcamefirst (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 05 Jan 2010 04:21:42 PM UTCCaSStatusNone=>Invalid
      Open/ClosedOpen=>Declined

    Back to the top


    Powered by Savane 3.1-cleanup1