[GitHub] cordova-plugin-file pull request: CB-7253: requestFileSystem fails...

2015-11-04 Thread asfgit
Github user asfgit closed the pull request at:

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


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-file pull request: CB-7253: requestFileSystem fails...

2015-11-03 Thread riknoll
Github user riknoll commented on the pull request:


https://github.com/apache/cordova-plugin-file/pull/145#issuecomment-153502297
  
LGTM. I don't really know how to test this thoroughly because of the 
external storage stuff, but the code looks solid and mobilespec passes (on a 
marshmallow device and 5.1.1 emulator) so I will merge this in by the end of 
today unless there are any objections.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



Re: [GitHub] cordova-plugin-file pull request: CB-7253: requestFileSystem fails...

2015-11-01 Thread Jesse
I thought the whole KiB thing was a geek joke. I had no idea it even
existed until I saw all of the text related to image resources allowed for
submitting apps to the showcase. ( Which I also thought was an entirely
tongue in cheek request ... )


@purplecabbage
risingj.com

On Sat, Oct 31, 2015 at 1:15 PM, dblotsky  wrote:

> Github user dblotsky commented on a diff in the pull request:
>
>
> https://github.com/apache/cordova-plugin-file/pull/145#discussion_r43575761
>
> --- Diff: src/android/DirectoryManager.java ---
> @@ -56,45 +56,46 @@ public static boolean testFileExists(String name) {
>  }
>
>  /**
> - * Get the free disk space
> - *
> + * Get the free space in external storage
> + *
>   * @return Size in KB or -1 if not available
> --- End diff --
>
> Hah, I actually didn't know that the tradition has been for KB to mean
> 1024. I had someone drill KiB into me recently, so I was under the
> impression that KiB were the way to go. Thanks for disillusioning me!
>
>
> ---
> 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 infrastruct...@apache.org or file a JIRA ticket
> with INFRA.
> ---
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
> For additional commands, e-mail: dev-h...@cordova.apache.org
>
>


[GitHub] cordova-plugin-file pull request: CB-7253: requestFileSystem fails...

2015-10-31 Thread dblotsky
Github user dblotsky commented on a diff in the pull request:

https://github.com/apache/cordova-plugin-file/pull/145#discussion_r43575761
  
--- Diff: src/android/DirectoryManager.java ---
@@ -56,45 +56,46 @@ public static boolean testFileExists(String name) {
 }
 
 /**
- * Get the free disk space
- * 
+ * Get the free space in external storage
+ *
  * @return Size in KB or -1 if not available
--- End diff --

Hah, I actually didn't know that the tradition has been for KB to mean 
1024. I had someone drill KiB into me recently, so I was under the impression 
that KiB were the way to go. Thanks for disillusioning me!


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-file pull request: CB-7253: requestFileSystem fails...

2015-10-30 Thread TimBarham
Github user TimBarham commented on a diff in the pull request:

https://github.com/apache/cordova-plugin-file/pull/145#discussion_r43565677
  
--- Diff: src/android/DirectoryManager.java ---
@@ -56,45 +56,46 @@ public static boolean testFileExists(String name) {
 }
 
 /**
- * Get the free disk space
- * 
+ * Get the free space in external storage
+ *
  * @return Size in KB or -1 if not available
--- End diff --

I would say 50 years of tradition outweighs an IEC standard that nobody 
uses.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-file pull request: CB-7253: requestFileSystem fails...

2015-10-30 Thread dblotsky
Github user dblotsky commented on a diff in the pull request:

https://github.com/apache/cordova-plugin-file/pull/145#discussion_r43565104
  
--- Diff: src/android/DirectoryManager.java ---
@@ -56,45 +56,46 @@ public static boolean testFileExists(String name) {
 }
 
 /**
- * Get the free disk space
- * 
+ * Get the free space in external storage
+ *
  * @return Size in KB or -1 if not available
--- End diff --

Nitpick: if we're dividing by 1024, then these are `KiB`.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-file pull request: CB-7253: requestFileSystem fails...

2015-10-30 Thread jasongin
Github user jasongin commented on the pull request:


https://github.com/apache/cordova-plugin-file/pull/145#issuecomment-152657217
  
@infil00p or @riknoll can you review?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-file pull request: CB-7253: requestFileSystem fails...

2015-10-30 Thread jasongin
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 
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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