Closed Bug 347778 Opened 19 years ago Closed 19 years ago

moveTo no longer creates directories when needed for Mac OS X - (fallout from Bug 294584)

Categories

(Core :: XPCOM, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.8.1beta2

People

(Reporter: robert.strong.bugs, Assigned: mark)

References

Details

(Keywords: fixed1.8.1, regression)

Attachments

(1 file)

Spinoff of bug 344276 comment #8 594 nsCOMPtr<nsIFile> parentDir = newParentDir; 595 if (!parentDir) { 596 if (newName.IsEmpty()) 597 return NS_ERROR_INVALID_ARG; 598 rv = GetParent(getter_AddRefs(parentDir)); 599 if (NS_FAILED(rv)) 600 return rv; 601 } else { PRBool exists; rv = parentDir->Exists(&exists); if (NS_FAILED(rv)) return rv; if (!exists) { rv = parentDir->Create(nsIFile::DIRECTORY_TYPE, 0777); if (NS_FAILED(rv)) return rv; }
No longer blocks: 344276
Keywords: regression
Component: File Handling → XPCOM
QA Contact: ian → xpcom
Attached patch FixSplinter Review
Attachment #232580 - Flags: review?(darin)
Blocks: 294584
Attachment #232580 - Flags: review?(darin) → review+
This is also begging for a regression test. Maybe you could add something to nsIFileTest.cpp (although that file suffers from not generating a simple PASS/FAIL output). No need to request review before making improvements to regression tests!
OK, I checked this in with a regression test in nsIFileText, and fixed a broken test in there as well. I am seeing the InitTest fail during Append on OS X, I'll investigate that later. Nobody's touched Append lately.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Attachment #232580 - Flags: approval1.8.1?
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.1b1) Gecko/20060803 BonEcho/2.0b1 I've verified with my own (branch) build that this patch fixes the issue described in bug 344276.
Status: RESOLVED → VERIFIED
Re comment 3, the failure in InitTest is an expected condition, due to calling AppendNative to append more than a single node to the path. I've made annotations to nsIFileTest to make this clear.
Comment on attachment 232580 [details] [diff] [review] Fix a=drivers, and please check the updated regression test in on branch as well.
Attachment #232580 - Flags: approval1.8.1? → approval1.8.1+
*** Bug 344276 has been marked as a duplicate of this bug. ***
Checked in on MOZILLA_1_8_BRANCH for 1.8.1b2 (note: regression introduced after 1.8.1b1).
Keywords: fixed1.8.1
Target Milestone: --- → mozilla1.8.1beta2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: