cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Severin Deutschmann (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CB-10293) Using cordova-plugin-file fileEntry.remove() - get a success callback, file is removed but application size stays the same
Date Mon, 04 Jan 2016 19:51:40 GMT
Severin Deutschmann created CB-10293:
----------------------------------------

             Summary: 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: Android, Plugin File
         Environment: Android 5.x
            Reporter: Severin Deutschmann


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: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message