Closed Bug 452516 Opened 16 years ago Closed 16 years ago

nsLocalFile::GetNativePath() returns path in UTF8 instead of native encoding under OSX

Categories

(Core :: Networking: File, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: michal, Unassigned)

References

Details

Attachments

(1 file)

It is not possible to get filepath in native encoding under OSX. It seems that filenames with other than UTF8 encoding can exists on OSX filesystem since bug 408138 can be reproduced there. And that bug can't be fixed in OSX unless GetNativePath() returns filepath in native encoding.
I have spend some time on this. The test from bug 408138 is not able to create file \202.txt. It is not valid file name. Then, there is a comment in net_GetURLSpecFromFile that the code is identacal to the code in the UNIX version of the function. It is not true because the UNIX version is using GetPath on the file but OSX version is using GetNativePath. The test didn't find any problem, if it were sufficient... I ported Michal's fix to OSX helper, but it seems it has no effect. The condition 'if (nativePath == ePath)' is always true.
Ported Michal's fix to OSX version.
There is no problem with this on OS X. If someone feels any different, please reopen, this bug has a working patch for the issue.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: