Files icon indicating copy to clipboard operation
Files copied to clipboard

Bug: OneDrive size is being calculated wrong

Open ferrariofilippo opened this issue 2 years ago • 7 comments

Description

When displaying OneDrive's properties, space free/used/total refers to the disk where the local folder is stored, rather than the actual size of the folder

Steps To Reproduce

  1. Open OneDrive Properties

Steps to fix

  • Fix how OneDrive used space is calculated

Files Version

Version: 2.3.28.0 OS Version: 10.0.22000.978

Windows Version

Windows 11 Home 21H2 22000.856

Relevant Assets/Logs

OneDrive

ferrariofilippo avatar Sep 15 '22 21:09 ferrariofilippo

Asking @yaichenbaum for approval.

Josh65-2201 avatar Sep 18 '22 11:09 Josh65-2201

Approved

yaira2 avatar Sep 18 '22 15:09 yaira2

@cinqmilleans do you want to look at this?

yaira2 avatar Oct 21 '22 14:10 yaira2

Ok I analyze the bug.

cinqmilleans avatar Oct 21 '22 15:10 cinqmilleans

@yaichenbaum No, because the issue already exists in the preview version, before my changes. I was able to reproduce the problem, I will analyze.

cinqmilleans avatar Oct 22 '22 09:10 cinqmilleans

@yaichenbaum There is a logic to this behavior. OneDrive uses a folder placed by default in the C: drive. The sizes displayed therefore correspond to the drive that hosts the folder synchronized with OneDrive. However, the expected, intuitive behavior is to display the remote sizes. This requires code to retrieve these values. It appears that this code does not currently exist for any cloud provider.

It would be interesting to add this information in the CloudProvider class. The tooltip and the popup can display 2 sections, one for local sizes and another for remote sizes. It would be a very practical added value.

cinqmilleans avatar Oct 22 '22 11:10 cinqmilleans

No, because the issue already exists in the preview version, before my changes. I was able to reproduce the problem, I will analyze.

That's correct, this issue has been around for a while and isn't related to any of your recent changes.

It would be interesting to add this information in the CloudProvider class. The tooltip and the popup can display 2 sections, one for local sizes and another for remote sizes. It would be a very practical added value.

I imagine the expected behavior for cloud drives is to only display the remote values and to fall back on the local values if that's the only information available.

yaira2 avatar Oct 23 '22 00:10 yaira2

So this should be fixed for now by just calculating the local folder size for OneDrive?

hecksmosis avatar Jan 08 '23 16:01 hecksmosis

That would fix only UsedSpace not TotalSpace

ferrariofilippo avatar Jan 08 '23 16:01 ferrariofilippo

Oh true

hecksmosis avatar Jan 08 '23 16:01 hecksmosis

Is there a way to get the remote size with code?

hecksmosis avatar Jan 08 '23 16:01 hecksmosis

FYI this also happens with Mega.

image

smarquespt avatar May 02 '23 20:05 smarquespt