View Issue Details

IDProjectCategoryView StatusLast Update
0001662SOGo Connectorwith SOGopublic2012-03-16 18:56
ReporterStefan Assigned Towsourdeau 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product VersionMonotone / nightly 
Fixed in Version10.0.1 
Summary0001662: Path parsing does not work on Windows (XP, maybe also Vista/7) and causes stop of sync with 10.0pre4
Description

Windows URI for file-URL is file:///c:/WINDOWS/clock.avi see http://en.wikipedia.org/wiki/File_URI_scheme

vcard.utils.js gives an exeption:

let file = Components.classes["@mozilla.org/file/local;1"]
                     .createInstance(Components.interfaces.nsILocalFile);
                     alert(uri);
if (uri.indexOf("file://") == 0) {
    uri = uri.substr(7);
}
file.initWithPath(uri);
Additional Information

Solution:

let file = Components.classes["@mozilla.org/file/local;1"]
                     .createInstance(Components.interfaces.nsILocalFile);
                     alert(uri);
if (uri.indexOf("file:///") == 0){
uri = uri.substr(8);
else if (uri.indexOf("file://") == 0) {
    uri = uri.substr(7);
}
file.initWithPath(uri);
TagsNo tags attached.

Activities

Stefan

Stefan

2012-03-02 12:46

reporter   ~0003518

Update: initWithPath needs the "native" of the path see https://developer.mozilla.org/en/Code_snippets/File_I%2F%2FO

so windows needs 'C:\folder\file.txt':

if (uri.indexOf("file:///") == 0){
    uri = uri.substr(8);
    uri = uri.replace("/","\\","g");
    uri = uri.replace("%20"," ","g");
} else if (uri.indexOf("file://") == 0) {
    uri = uri.substr(7);
}
wsourdeau

wsourdeau

2012-03-06 19:47

viewer   ~0003532

Fixed this morning. Please try https://inverse.ca/downloads/extensions/nightly/sogo-connector-10.0.1pre1.xpi

Stefan

Stefan

2012-03-07 19:57

reporter   ~0003548

Works with TB 10.0.2 on XP-Machine ...

ludovic

ludovic

2012-03-16 18:56

administrator   ~0003587

Fixed, closing.

Issue History

Date Modified Username Field Change
2012-03-02 11:54 Stefan New Issue
2012-03-02 12:46 Stefan Note Added: 0003518
2012-03-06 19:47 wsourdeau Note Added: 0003532
2012-03-06 19:47 wsourdeau Status new => resolved
2012-03-06 19:47 wsourdeau Fixed in Version => 10.0.1
2012-03-06 19:47 wsourdeau Resolution open => fixed
2012-03-06 19:47 wsourdeau Assigned To => wsourdeau
2012-03-07 19:57 Stefan Note Added: 0003548
2012-03-07 19:57 Stefan Status resolved => feedback
2012-03-07 19:57 Stefan Resolution fixed => reopened
2012-03-16 18:56 ludovic Note Added: 0003587
2012-03-16 18:56 ludovic Status feedback => closed
2012-03-16 18:56 ludovic Resolution reopened => fixed