Fix delete file call when deleting server

What does this MR do and why?

  • Fixes issue with deleting server's DB files on a server delete.

Screenshots or screen recordings

2025-11-14 00:08:34,405 - [Crafty] - ERROR    - tornado.application - Uncaught exception DELETE /api/v2/servers/6e95afe3-82b1-4b6c-90c1-1322f5de970d/ (127.0.0.1)
HTTPServerRequest(protocol='https', host='localhost:8443', method='DELETE', uri='/api/v2/servers/6e95afe3-82b1-4b6c-90c1-1322f5de970d/', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
  File "/var/opt/minecraft/crafty/.venv/lib/python3.11/site-packages/tornado/web.py", line 1846, in _execute
    result = method(*self.path_args, **self.path_kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/opt/minecraft/crafty/crafty-4/app/classes/web/routes/api/servers/server/index.py", line 370, in delete
    self.controller.remove_server(server_id, remove_files)
  File "/var/opt/minecraft/crafty/crafty-4/app/classes/shared/main_controller.py", line 1012, in remove_server
    self.servers.remove_server_db_files(server_id)
  File "/var/opt/minecraft/crafty/crafty-4/app/classes/controllers/servers_controller.py", line 179, in remove_server_db_files
    self.file_helper.del_dirs(
TypeError: FileHelpers.del_dirs() takes 1 positional argument but 6 were given

How to set up and validate locally

  1. Delete a server then check the logs for the above error

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

  • Have you checked this doesn't interfere/conflict/duplicate someone elses work?
  • Have you fully tested your changes?
  • Have you resolved any lint issues?
  • Have you assigned a reviewer?
  • Have you applied correct labels?
Edited by Andrew

Merge request reports

Loading