Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-7883

toURL() returns invalid URL values on windows

    XMLWordPrintableJSON

Details

    Description

      toURL method called on etnries returned by resolveLocalFileSystemURL and getDirectory produces path instead of URL. Note also inconsistent use of forward/backward slash separator in test output below.

      Below is test program and its output, demonstrating the problem:

      -----------------test program-----------------------
      window.resolveLocalFileSystemURL(
      	'file:///',
      	function(entry) {
      		console.log('Root URL is '+entry.toURL());
      		entry.getDirectory(
      			'Subdir',
      			{create:true},
      			function(entry1) {
      				console.log('Subdir URL is '+entry1.toURL());
      			},
      			function(err) { console.log(err); }
      		);
      	},
      	function(err) { console.log(err); }
      );
      -------------output------------------------
      Root URL is C:/Users/vladimir/AppData/Local/Packages/com.example.hello_dsh9t8a1qg3mw/LocalState/
      Subdir URL is C:\Users\vladimir\AppData\Local\Packages\com.example.hello_dsh9t8a1qg3mw\LocalState\Subdir/
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vldmrrr vldmrrrr
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: