Files
Files copied to clipboard
Bug: OneDrive size is being calculated wrong
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
- 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
Asking @yaichenbaum for approval.
Approved
@cinqmilleans do you want to look at this?
Ok I analyze the bug.
@yaichenbaum No, because the issue already exists in the preview version, before my changes. I was able to reproduce the problem, I will analyze.
@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.
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.
So this should be fixed for now by just calculating the local folder size for OneDrive?
That would fix only UsedSpace
not TotalSpace
Oh true
Is there a way to get the remote size with code?
FYI this also happens with Mega.