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.
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → WORKSFORME
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??
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.)
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.
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.
Reassigning to gayatri.
This morning's build (I haven't tried this in a while) seems fixed.
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?
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.
reassigning to myself.
Status: NEW → RESOLVED
Last Resolved: 19 years ago → 19 years ago
Resolution: --- → DUPLICATE
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 ***
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.