Closed Bug 1689740 Opened 1 year ago Closed 1 year ago

IOUtils.makeDirectory does not handle the case of calling it with a root directory

Categories

(Toolkit :: OS.File, defect, P2)

defect

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: barret, Assigned: barret)

References

Details

Attachments

(1 file)

If you call IOUtils.makeDirectory("/") on Linux or IOUtils.makeDirectory("C:\\") on Windows, it will crash. This is due to it assuming a parent directory always exists.

NB: This only occurs with createAncestors: false.

Assignee: nobody → brennie
Severity: -- → S3
Priority: -- → P2
Pushed by brennie@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4dd71fe08a0e
Check for nsIFile::GetParent() returning null in IOUtils r=emalysz
Pushed by brennie@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/87cb3511819f
Check for nsIFile::GetParent() returning null in IOUtils r=emalysz
Flags: needinfo?(brennie)
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Regressions: 1689997
You need to log in before you can comment on or make changes to this bug.