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

Group
 
 

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

Submitter:  Doug Simons <theeggcamefirst>
Submitted:  Tue 05 Jan 2010 01:15:16 AM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Declined
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-01-05 CaS StatusNone Invalid
        Open/ClosedOpen Declined

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code