bugGNUstep - Bugs: bug #22473, GWorkspace supplying invalid path...

Group
 
 

bug #22473: GWorkspace supplying invalid path to bundles on windows.

Submitter:  Riccardo Mottola <rmottola>
Submitted:  Tue 04 Mar 2008 11:18:54 AM UTC
   
 
Category:  Application 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
   

Jump to the original submission

Sun 01 Nov 2020 08:37:31 PM UTC, comment #7: 

Closing this bug.  There is no purpose for GWorkspace on Windows.

Gregory John Casamento <gcasa>
Group administrator
Sun 01 Nov 2020 08:34:33 PM UTC, comment #6: 

Are we seriously using GWorkspace on Windows?

Gregory John Casamento <gcasa>
Group administrator
Thu 06 Mar 2008 04:53:27 AM UTC, comment #5: 

As I said ... the problem is nothing to do with NSBundle or the base library.
If this was MacOS-X the bundle code would be raising an NSInvalidArgumentException, but the base library implementation is just trying to be more tolerant ... so it generates a warning log message and tries to guess what the caller actually meant to supply as an argument.
I'm renaming this bug to more accurately describe the issue.

Richard Frith-Macdonald <CaS>
Group Member
Wed 05 Mar 2008 10:29:03 PM UTC, comment #4: 

I rebuilt base with your changes (but not GWorkspace). I get the same error, at the same line.

2008-03-05 23:15:45.285 GWorkspace[1648] File NSBundle.m: 1233. In [NSBundle -initWithPath:] NSBundle -initWithPath: requires absolute path names, given '\GNUstep\Local\Applications\PRICE.app'

am I missing something?

Riccardo Mottola <rmottola>
Group Member
Wed 05 Mar 2008 07:06:33 PM UTC, comment #3: 

Unfortunately not ... stringByStandardizingPath is unable to convert a relative path to an absolute one on windows, since it doesn't know which drive the path is on.
The only solution is for the calling code to pass in a valid (absolute) path.   The hack in base is just for convenience ... if you were running the same code on MacOSX it would simply fail.

Richard Frith-Macdonald <CaS>
Group Member
Wed 05 Mar 2008 05:42:39 PM UTC, comment #2: 

I don't know what the real reason for this problem is, but a simple way to work around it should be to move the line
  path = [path stringByStandardizingPath];

in [NSBundle initWithPath:] up before the isAbsolutePath check. In most cases we will then end up with a proper path for the platform.

Fred Kiefer <FredKiefer>
Group Member
Wed 05 Mar 2008 02:00:44 PM UTC, comment #1: 

I think this is a GWorkspace issue ... though it might be getting the path from an open panel or something similar.
As a partial workaround, I added some code in base to try to guess the absolute path ... it's impossible for that to be completely reliable, but it should work in most cases.

Richard Frith-Macdonald <CaS>
Group Member
Tue 04 Mar 2008 11:18:54 AM UTC, original submission:  

when double-clicking applications in Workspace on Windows, I get the following erros:

$ 2008-03-04 11:58:01.213 GWorkspace[3948] File NSBundle.m: 1233. In [NSBundle -initWithPath:] NSBundle -initWithPath: requires absolute path names, given '\GNUstep\System\Applications\ProjectCenter.app'
2008-03-04 11:58:20.509 GWorkspace[3948] File NSBundle.m: 1233. In [NSBundle -initWithPath:] NSBundle -initWithPath: requires absolute path names, given '\GNUstep\System\Applications\SystemPreferences.app'

I think it used to work.

"openapp" of the same application works

Riccardo Mottola <rmottola>
Group Member

 

(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 gcasa (Posted a comment)
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by rmottola (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-01 gcasa StatusConfirmed Wont Fix
        Open/ClosedOpen Declined
    2008-03-06 CaS Summarybundle init on windows path problem GWorkspace supplying invalid path to bundles on windows.
    2008-03-05 CaS CategoryNone Application
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code