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

Joe Bowser updated CB-10293:
----------------------------
         Labels: Android  (was: )
    Component/s:     (was: Android)

> Using cordova-plugin-file fileEntry.remove() - get a success callback, file 
> is removed but application size stays the same
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-10293
>                 URL: https://issues.apache.org/jira/browse/CB-10293
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>         Environment: Android 5.x
>            Reporter: Severin Deutschmann
>              Labels: Android
>
> Removing a file with:
> function deleteFile(filePath) {
>     var pathToFile = cordova.file.applicationStorageDirectory + "cache" + 
> filePath;
>     window.resolveLocalFileSystemURL(pathToFile, function (fileEntry) {
>       fileEntry.remove(function () {
>         console.log("File removed with the path: " +  pathToFile)
>       }, errorHandler.bind(null, filePath));
>     }, errorHandler.bind(null, filePath));
>   }
> This seems to work, because I get a success callback and when I search the 
> directory with a directoryReader I see that the files are removed. Everything 
> checks out except that the file size in the android application manager stays 
> the same.
> e.g. a file gets added to the cache/ directory in the 
> applicationStorageDirectory. It's 1mb big. I check the application manager 
> and the temporary files got 1mb bigger. I check with directoryReader and I 
> see the file.
> The I delete the file with above mentioned function. No errors, just a 
> success callback. I check again with directoryReader, the file is gone.
> But the temporary files are still 1mb bigger than before even though the file 
> should have been deleted.
> I flagged this as major as I don't have found a workaround



--
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