From 0490007ab5bce2aaf1584cf19cd79e10149dc287 Mon Sep 17 00:00:00 2001 From: Kukks Date: Thu, 23 Feb 2023 16:03:44 +0100 Subject: [PATCH] fix dir --- .../AffiliateServer/AffiliateServerController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plugins/BTCPayServer.Plugins.Wabisabi/AffiliateServer/AffiliateServerController.cs b/Plugins/BTCPayServer.Plugins.Wabisabi/AffiliateServer/AffiliateServerController.cs index 4ed487a..1dc89f6 100644 --- a/Plugins/BTCPayServer.Plugins.Wabisabi/AffiliateServer/AffiliateServerController.cs +++ b/Plugins/BTCPayServer.Plugins.Wabisabi/AffiliateServer/AffiliateServerController.cs @@ -110,8 +110,8 @@ public class AffiliateServerController:Controller return NotFound(); var path = Path.Combine(_dataDirectories.Value.DataDir, "Plugins", "CoinjoinAffiliate", "History.txt"); - - + + Directory.CreateDirectory(Path.GetDirectoryName(path)); await System.IO.File.AppendAllLinesAsync(path, new[] {JObject.FromObject(request).ToString(Formatting.None).Replace(Environment.NewLine, "")}, Encoding.UTF8); var response = new CoinJoinNotificationResponse(Array.Empty()); return Json(response, AffiliationJsonSerializationOptions.Settings);