Closed
Bug 12107
Opened 25 years ago
Closed 25 years ago
CreateDirectory doesn't
Categories
(Core :: XPCOM, defect, P3)
Tracking
()
M12
People
(Reporter: danm.moz, Assigned: racham)
References
Details
Attempts to create a new directory don't work on Windows unless the parent directory already exists.
You'll notice this if you're missing your profile directory and its parent. Say your profile name is gorgonzola.
During Mozilla startup, it'll try to create the directory mozilla/dist/Users50/gorgonzola. And it will silently
fail unless directories up through Users50 already exist.
It comes to a call to xpcom/io/nsFileSpecWin.cpp/nsFileSpec::CreateDirectory(), which calls a library
function mkdir(). The Windows version of that library function just doesn't do what we're expecting it to do.
Updated•25 years ago
|
Assignee: warren → dougt
Comment 1•25 years ago
|
||
-> dougt
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
Comment 2•25 years ago
|
||
CreateDirectory is not recursive. It only works on the current leaf. Use this
instead:
nsFileSpec(something, PR_TRUE);
^^^^^^^
This will create the directories to the final node. Then you can call
CreateDirectory on the final node to create that.
Take a look at the test application (mozilla/xpcom/tests/FilesTest.cpp) for
examples of this.
Okayyyyy Maybe the problem is in the use of CreateDirectory and this bug needs to be reassigned
to the caller of that function. Regardless of the problem, the symptom remains demonstrable: unless
you pre-create Users50 by hand, the profile directory within Users50 is never created. Or is this only
true on my machine??
Comment 4•25 years ago
|
||
sure. who owns the pref code nowadays?
Clearing Fixed resolution due to reopen of bug.
Could we release note for M9? Or too ugly :-)?
Woo hoo! I say selmer gets it, because his bug 12186 sure sounds related. I don't know if we need
to put this in the release notes: this problem has been true for months; I just got around to reporting
it recently. (I figured somebody else *must* have noticed.)
Comment 7•25 years ago
|
||
Hmmm. I don't see this problem on yesterday's commercial build. It creates the
users50 directory just fine on my NT box. Is this a win95/win98-ism?
BTW, there is no relation to the bug
http://bugzilla.mozilla.org/show_bug.cgi?id=12186 - that was caused by the gfx
text widget checkin.
Updated•25 years ago
|
Assignee: selmer → racham
Comment 8•25 years ago
|
||
Gayatri was going to look at this, see if she did anything before you start.
It has never made the Users50 directory on either of my NT boxes, as long as I've been running Mozilla.
This is why it throws a dozen asserts on startup with today's build.
Assignee | ||
Comment 10•25 years ago
|
||
Reassigning to gayatri.
Reporter | ||
Comment 11•25 years ago
|
||
This morning's build (I haven't tried this in a while) seems fixed.
Reporter | ||
Comment 12•25 years ago
|
||
And every Windows build I've made, every day this week, crashes on startup until I remember to
go make the Users50 directory before I launch. Crimminy. Is no one else seeing this?
Updated•25 years ago
|
QA Contact: rickg → gbush
Comment 13•25 years ago
|
||
If I delete my users50 directory, but don't delete mozregistry.dat (which
contains profile location info) then I get a message that says: Failed to start
communicator with the paulmac profile. I can then create a new profile and
launch successfully.
This is on a commercial build from this morning.
Assignee | ||
Comment 14•25 years ago
|
||
reassigning to myself.
Status: NEW → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 15•25 years ago
|
||
Fixed. There is no need to create User50 manually anymore. I checked in a fix to
the bug 16414, which will do the recursive creation of parent folders too.
Resolving this bug by marking it as a dup of Bug #16414.
*** This bug has been marked as a duplicate of 16414 ***
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 16•25 years ago
|
||
Bulk moving to XPCOM, in preparation for removal of XP File Handling component.
(XPFH has received two bugs in ~5 months, and is no longer in active use.)
Component: XP File Handling → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•