[ 
https://issues.apache.org/jira/browse/CB-8491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14322738#comment-14322738
 ] 

Olivier Louvignes commented on CB-8491:
---------------------------------------

Issue was from a bah path.join function that dropped the `file:///` to 
`file://`, oddly, it was working on the tmp folder this way.

> [iOS] Can't save file at the root of any available directories
> --------------------------------------------------------------
>
>                 Key: CB-8491
>                 URL: https://issues.apache.org/jira/browse/CB-8491
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS, Plugin File Transfer
>         Environment: iOS 8.1.2
>            Reporter: Olivier Louvignes
>
> When attempting to save a file at the root of one of the available sandboxes, 
> like `cordova.file.dataDirectory + '/release.json'`, the plugin will always 
> attempt first to create the directory (l. 670 after `// create parent 
> directories if needed`), but in this case it logically gets a permission 
> error on the folder and does not create the file afterwards.
> ```
> err 
> Object
> body: "Could not create path to save downloaded file: The operation couldn’t 
> be completed. (Cocoa error 513.)"
> code: 1
> exception: null
> http_status: 200
> source: "https://foobar.com/release.json";
> target: 
> "file://var/mobile/Containers/Data/Application/5BB23C0A-B25C-49CE-B5A0-5D9FE67D20B2/Library/NoCloud/release.json"
> __proto__: Object
> ```



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to