stuajnht / HAP-for-iOS

HAP+ for use on iOS devices
GNU General Public License v3.0
5 stars 2 forks source link

Bug: Drive Percentage Incorrect Values #17

Closed stuajnht closed 8 years ago

stuajnht commented 8 years ago

Description:

When listing the drives available to the user, sometimes a "minus" value is shown instead of the actual percentage

Steps to Reproduce Bug:

Browse to the "My Drives" screen and look at the amount used for the drives. It seems to apply to drives that have a quota set on them.

Expected Result:

Values less than 0 shouldn't be shown

Actual Result:

Values such as "-698.75% used" are shown

HAP+ for iOS Version(s):

0.3.0, 0.4.0, 0.5.0

HAP+ Server Version:

10.4.927.1330

iOS Device(s):

Any

Other Comments:

stuajnht commented 8 years ago

Screenshots showing the issue: A "student" user account where they have a quota on one drive and read only access to the other 02668aef

A "staff" user account where they don't have quotas and can read and write to all drives, apart from the last drive which has a quota on 96169c17

stuajnht commented 8 years ago

This seems to be caused by the HAP+ server when it generates the drive listing. Here's a snippet from the JSON result from the API call that lists the drives:

[{"Actions":0,"Icon":"..\/images\/icons\/netdrive.png","Name":"Home","Path":"H\","Space":-698.74},{"Actions":1,"Icon":"..\/images\/icons\/netdrive.png","Name":"Common","Path":"J\","Space":-1}]