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

 
 

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

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

Submitted by:  Gregory John Casamento <gcasa>
Submitted on:  Sat 08 Nov 2008 04:32:24 PM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Wont Fix
Privacy: PublicAssigned to: None
Open/Closed: Declined

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>
Project 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>
Project 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>
Project 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>
Project Administrator

 

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 gcasa (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
    Sat 08 Nov 2008 05:12:09 PM UTCCaSStatusNone=>Wont Fix
      Open/ClosedOpen=>Declined

    Back to the top


    Powered by Savane 3.1-cleanup1