internxt / drive-desktop

https://internxt.com/drive
GNU Affero General Public License v3.0
168 stars 21 forks source link

[PB-1029] fix: folder creation with name #387

Closed JoanVicens closed 1 year ago

JoanVicens commented 1 year ago

When creating a folder and giving it a name right away it was likely to not have been able to create the folder on the remote server leaving the folder desynchronized and not being able to make any action with it.

To solve this problem we create the folder uuid on the client and return it as quickly as possible to be able to handle the action that takes place on that folder.

With a stable connection, I've observed that the creation of the folder finishes before the rename of the folder. In that case, the rename is performed as normal.

If the post to folders is slower the rename can happen before the folder is created, in this case, the rename is stored locally and once the folder is created we check for any renames and perform the appropriate actions.

sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
6.1% 6.1% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint