cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasongin <...@git.apache.org>
Subject [GitHub] cordova-plugin-file pull request: CB-7253: requestFileSystem fails...
Date Fri, 30 Oct 2015 20:55:46 GMT
GitHub user jasongin opened a pull request:

    https://github.com/apache/cordova-plugin-file/pull/145

    CB-7253: requestFileSystem fails when no external storage is present

    There were 2 issues behind this bug:
    1) DirectoryManager.getFreeDiskSpace() used an incorrect way of
    checking the free internal storage space: using a path of "/" would
    always result in 0 reported free space.
    2) When checking whether requested space was available, the
    requestFileSystem() method would always check the external storage
    space and fallback to internal storage space, regardless of what
    type of filesystem (external, internal, or other) was being requested.
    
    To fix both of these issues, I've added a new getFreeSpaceInBytes() method
    on the FileSystem base class, which is called on the actual filesystem
    instance being retrieved by requestFileSystem(). The new method for
    getting free space always uses the filesystem's correct root path, so
    it works for internal, external or any other Android storage filesystem.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jasongin/cordova-plugin-file CB-7253

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-file/pull/145.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #145
    
----
commit 4097a9855653aaf7f62806c06f1ae0502a29fbad
Author: Jason Ginchereau <jasongin@microsoft.com>
Date:   2015-10-30T20:15:47Z

    CB-7253: requestFileSystem fails when no external storage is present
    
    There were 2 issues behind this bug:
    1) DirectoryManager.getFreeDiskSpace() used an incorrect way of
    checking the free internal storage space: using a path of "/" would
    always result in 0 reported free space.
    2) When checking whether requested space was available, the
    requestFileSystem() method would always check the external storage
    space and fallback to internal storage space, regardless of what
    type of filesystem (external, internal, or other) was being requested.
    
    To fix both of these issues, I've added a new getFreeSpaceInBytes() method
    on the FileSystem base class, which is called on the actual filesystem
    instance being retrieved by requestFileSystem(). The new method for
    getting free space always uses the filesystem's correct root path, so
    it works for internal, external or any other Android storage filesystem.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message