bugGNUstep - Bugs: bug #24779, GNUstep file and directory path...

Group
 
 

bug #24779: GNUstep file and directory path methods seem to return strings in Windows format

Submitter:  Gregory John Casamento <gcasa>
Submitted:  Sat 08 Nov 2008 04:32:24 PM UTC
   
 
Category:  Gui/AppKit Severity:  3 - Normal
Item Group:  Bug Status:  Wont Fix
Privacy:  Public Assigned to:  None
Open/Closed:  Declined
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 08 Nov 2008 10:46:43 PM UTC, comment #3: 

NB. windows and unix paths are fundamentally different ... unix has a single root and windows has multiple roots.  Applications dealing with paths may, in some cases, need to be aware of this.  They can use [NSWorkspace-mountedLocalVolumePaths] to list potential roots, and [NSString-stringByDeletingLastPathComponent] repeatedly to determine if each path is a root.

Richard Frith-Macdonald <CaS>
Group Member
Sat 08 Nov 2008 05:12:09 PM UTC, comment #2: 

The string handling behavior is intentional, well documented, and the result of much debate on the GNUstep mailing lists.

Essentially the opinion of windows users was that paths on windows MUST conform to local conventions, and that all the path manipulation methods must therefore work with both unix and windows style paths (which they do).

As long as an application carefully manipulates paths using the path manipulation methods in the API the application will be portable between systems.  Applications which contain code which depends on the path separator being a specific character are buggy/non-portable and should be fixed to use the standard path handling methods from NSString.

Richard Frith-Macdonald <CaS>
Group Member
Sat 08 Nov 2008 04:33:18 PM UTC, comment #1: 

Please note this only appears to be a problem on Windows.

Gregory John Casamento <gcasa>
Group administrator
Sat 08 Nov 2008 04:32:24 PM UTC, original submission:  

This was reported to me by a third party:

GNUstep file and directory path methods (such as [NSFileManager currentDirectoryPath] ) seem to return strings in Windows format (using \ instead of /). While the Cocoa docs I’ve read aren’t totally obvious about this, the path methods in NSString suggest that Cocoa expects all file paths to be in Unix format internally (see the description of [NSString getFileSystemRepresentation:maxLength:] for example). So GNUstep’s behavior might be seen as a “bug”.

--
GC

Gregory John Casamento <gcasa>
Group administrator

 

(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 gcasa (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
    2008-11-08 CaS StatusNone Wont Fix
        Open/ClosedOpen Declined

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code