[ 
https://issues.apache.org/jira/browse/CB-9991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Ginchereau resolved CB-9991.
----------------------------------
    Resolution: Cannot Reproduce

I cannot reproduce this with cordova 5.4.0 and cordova-plugin-file 3.0.0 
targeting an iOS 9 device. No matter what I do I see only the expected 3 
slashes in the file:///var/mobile/... URL.

I don't see any recent changes in the file plugin iOS code that might have 
fixed this, but maybe there was something. Anyway if you can reproduce this 
with the latest version of cordova and the file plugin then please reactivate 
the issue with more details.

> resolveLocalFileSystemURL returns extra leading slash in nativeURL for some 
> paths
> ---------------------------------------------------------------------------------
>
>                 Key: CB-9991
>                 URL: https://issues.apache.org/jira/browse/CB-9991
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>         Environment: cordova 5.3.3
> cordova ios 3.9.1
> cordova-plugin-file 2.0.0
> iOS
>            Reporter: Denis Babineau
>              Labels: Triaged, easyfix, iOS
>
> The following:
> window.resolveLocalFileSystemURL(cordova.file.applicationDirectory, 
> function(e) { console.log("OK:", e); }, function(e) { console.log("ERR:", e); 
> });
> returns an object with nativeURL that looks like this (notice the 4 slashes 
> past the protocol, should be 3 slashes):
> "file:////var/mobile/Containers/Bundle/Application/EC6F4A71-B8A8-4156-A43B-C7CB4F39FA19/Test.app/"
> I narrowed it down to CDVLocalFilesystem.m's filesystemPathForFullPath 
> implementation not handling extra leading slashes properly when fsRoot == '/':
> - (NSString *)filesystemPathForFullPath:(NSString *)fullPath
> {
>     NSString *path = nil;
>     NSString *strippedFullPath = [self stripQueryParametersFromPath:fullPath];
>     path = [NSString stringWithFormat:@"%@%@", self.fsRoot, strippedFullPath];
>     if ([path length] > 1 && [path hasSuffix:@"/"]) {
>       path = [path substringToIndex:([path length]-1)];
>     }
>     return path;
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to