Closed Bug 15305 Opened 25 years ago Closed 25 years ago

CreateDirectory does not created nested directories

Categories

(Core :: XPCOM, defect, P3)

All
Windows NT
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: jimmykenlee, Assigned: dougt)

References

Details

Build: 9/29/99 SeaMonkey build

1. From http://jimbob/trigger2.html, trigger
   http://jimbob/jars/f_fileop_dircreate_nested.xpi

Install.StartInstall("Acceptance: f_fileop_dircreate_nested",
"f_fileop_dircreate_nested", "1.1.1.1", 0);
f = Install.GetFolder("Program");
err1 = Install.DirCreate(f +
"f_fileop_dircreate_nested/байинмутъщзвкофы/111/222/AAA/BBB");
Install.LogComment("Nested DirCreate returns = " + err1);
err2 = Install.DirCreate(f + " ");
Install.LogComment("One blank character DirCreate returns = " + err2);
err3 = Install.DirCreate(f + "");
Install.LogComment("No characters DirCreate returns = " + err3);

RESULT:
No directories are created on any platform.

For WinNT and Win98, the Install.log shows:
---------------------------------------------------------------------------
http://jimbob/jars/f_fileop_dircreate_nested.xpi     --     09/30/1999 15:31:22
---------------------------------------------------------------------------

     Acceptance: f_fileop_dircreate_nested
     -------------------------------------

     ** Nested DirCreate returns = 0
     ** One blank character DirCreate returns = 0
     ** No characters DirCreate returns = 0
     Item [1/3]	Create Folder: C:\Program
Files\moz929\x86rel\f_fileop_dircreate_nested\байинмутъщзвкофы\111\222\AAA\BBB
     Item [2/3]	Create Folder: C:\Program Files\moz929\x86rel\
     Item [3/3]	Create Folder: C:\Program Files\moz929\x86rel\

     Install completed successfully
     Finished Installation  09/30/1999 15:31:22

For Macintosh, the Install.log shows:
---------------------------------------------------------------------------
http://jimbob/jars/f_fileop_dircreate_nested.xpi     --     09/30/1999 15:38:47
---------------------------------------------------------------------------

     Acceptance: f_fileop_dircreate_nested
     -------------------------------------
     ** Nested DirCreate returns = 0
     ** One blank character DirCreate returns = 0
     ** No characters DirCreate returns = 0
     Item [1/3]	Create Folder: Webbies:moz929:mozilla-mac-M11:
     Item [2/3]	Create Folder: Webbies:moz929:mozilla-mac-M11:
     Item [3/3]	Create Folder: Webbies:moz929:mozilla-mac-M11:
     Install completed successfully
     Finished Installation  09/30/1999 15:38:50

For Linux, the Install.log shows:
---------------------------------------------------------------------------
http://jimbob/jars/f_fileop_dircreate_nested.xpi     --     09/30/1999 15:33:20
---------------------------------------------------------------------------

     Acceptance: f_fileop_dircreate_nested
     -------------------------------------
     ** Nested DirCreate returns = 0
     ** One blank character DirCreate returns = 0
     ** No characters DirCreate returns = 0
     Item [1/3]	Create Folder:
/u/jimmylee/linux60/sep_29/packagef_fileop_dircreate_nested/байинмутъщзвкофы/111
/222/AAA/BBB
     Item [2/3]	Create Folder: /u/jimmylee/linux60/sep_29/package
     Item [3/3]	Create Folder: /u/jimmylee/linux60/sep_29/package
     Install completed successfully
     Finished Installation  09/30/1999 15:33:21

This test also intentionally investigates the scenarios where one blank space
and no space are added, respectively, as a subdirectory name.  No subdirectories
are created in both cases.  This appears to be correct.

EXPECTED RESULT:
Nested directories are created as described from the Windows Install.log.
I think we should support nested direcotry crate, but not a beta stopper...
Sean?
Assignee: cathleen → ssu
Status: NEW → ASSIGNED
Target Milestone: M15
agreed.  Nested creation of directories should be implemented, but not beta1
critical.
Assignee: ssu → dougt
Status: ASSIGNED → NEW
This is nsFileSpec() specific.  Reassigning to dougt.
Component: XPInstall → XPCOM
QA Contact: jimmylee → dp
Summary: File Op: DirCreate does not created nested directories → CreateDirectory does not created nested directories
Workaround: do something like:

nsFileSpec a(inSpec.GetNativePathCString(), PR_TRUE);
a.CreateDirectory();

*warning* this will not work on the mac.
Depends on: 13320
Depends on: 22047
will be fixed by 22047
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
nsILocalFile does.
You need to log in before you can comment on or make changes to this bug.