Fixing .. folder creation error by preventing rendering of folder #152

Closed
opened 2026-04-05 19:50:56 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @why-context on 5/23/2025

This fix addresses issue(s):

Behaviour

This bug is caused by the client updating the file list when a new folder is created, even if it has not actually been created. This means that when the folder is to then be deleted, because the folder does not exist, it does not get deleted and results in an error.

What's been done

The mutate function for the new directory handler has been changed to mutate instead of the original mutate((data) => [...data!, generateDirectoryData(directoryName)], false)1 as the extra addition resulted in this behavior. The reason for this design is unknown to me and quite puzzling.


  1. This has been tested on vagrant and behaves correctly. This is done with the current tested assumption that leaving mutate blank forces the data to be regathered from the server, which is the same behavior as file uploads. ↩︎

*Originally created by @why-context on 5/23/2025* ## Related issues This fix addresses issue(s): - [x] #240 ## Behaviour This bug is caused by the client updating the file list when a new folder is created, even if it has not actually been created. This means that when the folder is to then be deleted, because the folder does not exist, it does not get deleted and results in an error. ## What's been done The mutate function for the new directory handler has been changed to `mutate` instead of the original `mutate((data) => [...data!, generateDirectoryData(directoryName)], false)`[^1] as the extra addition resulted in this behavior. The reason for this design is unknown to me and quite puzzling. [^1]: This has been tested on vagrant and behaves correctly. This is done with the current tested assumption that leaving mutate blank forces the data to be regathered from the server, which is the same behavior as file uploads.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pyrodactyl#152