local file paths are wrong on windows mobile

RESOLVED FIXED

Status

()

Core
XPCOM
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: dougt, Assigned: blassey)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

9 years ago
Created attachment 341479 [details] [diff] [review]
patch v.1 - patch from blassey

nslocalfile assumes that we have drive letters on windows mobile.  this isn't the case.
Attachment #341479 - Flags: review?(doug.turner)
(Reporter)

Updated

9 years ago
Attachment #341479 - Flags: superreview?(benjamin)
Attachment #341479 - Flags: review?(doug.turner)
Attachment #341479 - Flags: review+

Comment 1

9 years ago
Comment on attachment 341479 [details] [diff] [review]
patch v.1 - patch from blassey

A little more context would be helpful.

>diff -r 2450609542ba netwerk/base/src/nsURLHelperWin.cpp

>+#ifdef WINCE
>+    NS_NAMED_LITERAL_CSTRING(prefix, "file://");
>+#else
>     NS_NAMED_LITERAL_CSTRING(prefix, "file:///");

This deserves a comment at least: the final URL has triple-slashes, it's just that the last URL is taken from the actual path.

>diff -r 2450609542ba xpcom/io/nsLocalFileWin.cpp

>-    if ( ( (secondChar == L':') && !FindCharInReadable(L'/', begin, end) ) ||  // normal path
>+    if ( ( 
>+#ifndef WINCE
>+         (secondChar == L':') && 
>+#endif
>+         !FindCharInReadable(L'/', begin, end) ) ||  // normal path
> #ifdef WINCE
>          ( (firstChar == L'\\') )   // wince absolute path or network path
> #else

Can you please coalesce the two WINCE hunks? The "firstChar == L'\\' is the WINCE equivalent of the secondChar == L':' hunk
Attachment #341479 - Flags: superreview?(benjamin) → superreview-
taking bug so I remember to update the patch
Assignee: doug.turner → blassey
Created attachment 343171 [details] [diff] [review]
updated based on bsmedberg's comments
Attachment #341479 - Attachment is obsolete: true
Attachment #343171 - Flags: superreview?(benjamin)

Updated

9 years ago
Attachment #343171 - Flags: superreview?(benjamin) → superreview+
6a0475a370b1: Bug 458252: local file paths are wrong on windows mobile r=dougt sr=bsmedberg
diff
browse
Brad Lassey <blassey@mozilla.com> - Mon, 20 Oct 2008 13:03:20 -0400 - rev 20674
Bug 458252: local file paths are wrong on windows mobile r=dougt sr=bsmedberg
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.