From e937f4f7cb3ef7c6c6706991c07afb4350818706 Mon Sep 17 00:00:00 2001 From: Josh Date: Fri, 29 Jul 2022 22:48:44 -0500 Subject: [PATCH] Fix duplicate resource uploading (#382) --- .../Controllers/Resources/ResourcesController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ProjectLighthouse.Servers.GameServer/Controllers/Resources/ResourcesController.cs b/ProjectLighthouse.Servers.GameServer/Controllers/Resources/ResourcesController.cs index 1ea40e45..84a94038 100644 --- a/ProjectLighthouse.Servers.GameServer/Controllers/Resources/ResourcesController.cs +++ b/ProjectLighthouse.Servers.GameServer/Controllers/Resources/ResourcesController.cs @@ -75,7 +75,7 @@ public class ResourcesController : ControllerBase FileHelper.EnsureDirectoryCreated(assetsDirectory); // lbp treats code 409 as success and as an indicator that the file is already present - if (FileHelper.ResourceExists(hash)) this.Conflict(); + if (FileHelper.ResourceExists(hash)) return this.Conflict(); Logger.Info($"Processing resource upload (hash: {hash})", LogArea.Resources); LbpFile file = new(await readFromPipeReader(this.Request.BodyReader));