nextcloud / nextcloud/server

Folder size displays wrong unit sometimes: MB instead of GB

Open
#13,143 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop client: 💻 desktop client: 🤖🍏 mobile enhancement feature: files needs review
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

NC 15.0.0, PHP 7.2

I have found a folder on my Nextcloud that is slightly over 1 GB, and I think it displays wrong.
Shouldn't it show "1 GB", instead of "1.002,1 MB"?
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the folder-size display described in the issue using a folder slightly over 1 GB. Locate the code responsible for formatting folder sizes and check existing tests around unit selection. Done means the displayed unit and value are correct for sizes just over 1 GB, with coverage for the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.