bugGNUstep - Bugs: bug #4706, gopen should use absolute path of...

 
 

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

bug #4706: gopen should use absolute path of filename

Submitted by:  Stefan Urbanek <stefanu>
Submitted on:  Sun 10 Aug 2003 09:46:55 PM UTC  
 
Category: Gui/AppKitSeverity: 2 - Minor
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Gregory John Casamento <gcasa>
Open/Closed: Closed

Sat 15 Nov 2003 05:52:24 AM UTC, comment #2:

This appears to have been corrected by a recent change by Richard. I have tested this by putting a file with the same name in /tmp and ~/ and attempting to open the file explicitly in both places as described in the summary.

In each case the correct file is opened. I am closing this bug.

GJC

Gregory John Casamento <gcasa>
Project AdministratorIn charge of this item.
Fri 24 Oct 2003 09:29:57 AM UTC, comment #1:

Thanks ... I've fixed it in cvs.

As regards the use of '/' as a path separator in strings, my understanding is that this is OK as it's the separator used internally by GNUstep/OpenStep/MacOS-X. Only when we actually want to use a path in a antive systemcall etc do we translate it from an NSString to a C-string using NSFileManagers method fileSystemRepresentationWithPath:, and it is that method which converts from the internal path separator ('/') to the systems native separator.

That being said, I think it's good practice to append path components using the appropriate method.

Richard Frith-Macdonald <CaS>
Project Member
Sun 10 Aug 2003 09:46:55 PM UTC, original submission:

1. openapp Ink.app in ~
2. have some.rtf in ~
3. go to /tmp and have different some.rtf in /tmp
4. run: 'gopen some.tmp' in /tmp -> ~/some.rtf is opened
5. have other.rtf in /tmp and run 'gopen other.rtf' -> Ink will complain that the file does not exists

Patch is attached.

p.s.: by looking at ths bug i've seen some string appendings for paths using '/' instead of using stringByAppendingPathComponent: in NSWorkspace.m. i think that should be fixed to prevent future failures on mswindows or other os.

Stefan Urbanek <stefanu>
Project Member

 

Attached Files
file #591:  gopen.m.patch added by stefanu (632B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sat 15 Nov 2003 05:52:24 AM UTCgcasaStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)
Sat 16 Aug 2003 01:46:29 PM UTCgcasaAssigned toNone=>NA

Back to the top


Powered by Savane 3.1-cleanup1