[File] 'file' scheme is required when resolving an URL.
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Mon, 9 Nov 2015 08:29:56 +0000 (09:29 +0100)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Mon, 9 Nov 2015 08:29:56 +0000 (09:29 +0100)
[Verification] Code compiles, pass rate: 85/140.

Change-Id: I5e7f5c2f3010f4f29fa2ac66cef26bb271370790
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
src/file/js/resolveLocalFileSystemURI.js

index 261ad9e..69cc36a 100644 (file)
@@ -24,6 +24,12 @@ module.exports = {
     // fix for file.spec.10
     path = path.split('?')[0];
 
+    // fix for file.spec.12
+    if (0 !== path.indexOf('file://')) {  // 'file://' scheme is required
+      errorCallback && errorCallback(FileError.ENCODING_ERR);
+      return;
+    }
+
     function onResolve(file) {
       var filesystem = rootsUtils.findFilesystem(file.toURI());