description of NS_OS_CURRENT_PROCESS_DIR extremely confusing

RESOLVED WONTFIX

Status

()

Core
XPCOM
RESOLVED WONTFIX
14 years ago
5 years ago

People

(Reporter: Biesinger, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

61 /* Property returns the directory in which the procces was started from.  
 62  * On Unix this will be the path in the MOZILLA_FIVE_HOME env var and if 
 63  * unset will be the current working directory. 
 64  */
 65 #define NS_OS_CURRENT_PROCESS_DIR               "CurProcD"

it's not clear what this refers to. especially, the mention of MOZILLA_FIVE_HOME
makes it sound like this is really the installation directory. however, quoting
bsmedberg in bug 229636 comment 26:
 ------- Additional Comment #26 From Benjamin Smedberg  2004-02-15 19:15 PST 
[reply] -------

The value NS_OS_CURRENT_PROCESS_DIR is the OS "current directory".

The value NS_XPCOM_CURRENT_PROCESS_DIR is the directory of the mozilla
executable. This is almost always what people actually want.


I suggest changing the comments in nsDirectoryServiceDefs.h to what bsmedberg
said in the quoted bug comment.
Ideally, also change the name of NS_OS_CURRENT_PROCESS_DIR to
NS_CURRENT_WORKING_DIRECTORY.

Comment 1

14 years ago
got a patch?  
Created attachment 141538 [details] [diff] [review]
patch

ok... here it is
Assignee: dougt → cbiesinger
Status: NEW → ASSIGNED
Attachment #141538 - Flags: review?(dougt)

Comment 3

14 years ago
This feels wrong.  If NS_OS_CURRENT_PROCESS_DIR really is just the current
working directory, what makes it different from NS_OS_CURRENT_WORKING_DIR?

Comment 4

14 years ago
many platforms do not have a concept of a cwd -- when an linux application is
launched from the desktop, the cwd could point anywhere.  Mozilla tries overcome
this by providng MOZILLA_FIVE_HOME.  Other os's prefectly define what cwd is. 
There in lines the difference.

In this context, I do not think that the comment change is currect.
I guess I'll let someone deal with this who knows this stuff...
Assignee: cbiesinger → dougt
Status: ASSIGNED → NEW
Attachment #141538 - Flags: review?(dougt)
Assignee: dougt → nobody
QA Contact: xpcom

Comment 6

5 years ago
I was wrong. This does need something better, but I don't think I want to track it here.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.