> +        if ((bytes >= 0) && (bytes < kilobyte)) {
> +            return bytes + ' B';
> +        }
> +        if ((bytes >= kilobyte) && (bytes < megabyte)) {
> +            return (bytes / kilobyte).toFixed(precision) + ' KB';
> +        }
> +        if ((bytes >= megabyte) && (bytes < gigabyte)) {
> +            return (bytes / megabyte).toFixed(precision) + ' MB';
> +        }
> +        if ((bytes >= gigabyte) && (bytes < terabyte)) {
> +            return (bytes / gigabyte).toFixed(precision) + ' GB';
> +        }
> +        if (bytes >= terabyte) {
> +            return (bytes / terabyte).toFixed(precision) + ' TB';
> +        } else {
good catch. file size can never be negative. Removing.

—

2013/10/21, Jochen <notifications@github.com>:
>> +
>> +        if ((bytes >= 0) && (bytes < kilobyte)) {
>> +            return bytes + ' B';
>> +        }
>> +        if ((bytes >= kilobyte) && (bytes < megabyte)) {
>> +            return (bytes / kilobyte).toFixed(precision) + ' KB';
>> +        }
>> +        if ((bytes >= megabyte) && (bytes < gigabyte)) {
>> +            return (bytes / megabyte).toFixed(precision) + ' MB';
>> +        }
>> +        if ((bytes >= gigabyte) && (bytes < terabyte)) {
>> +            return (bytes / gigabyte).toFixed(precision) + ' GB';
>> +        }
>> +        if (bytes >= terabyte) {
>> +            return (bytes / terabyte).toFixed(precision) + ' TB';
>> +        } else {
>
> good catch. file size can never be negative. Removing.
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/adobe/brackets/pull/5530/files#r7098170